luarocks / luarocks/luarocks-site
https://luarocks.org/manifest always returns http code 200 (instead of 304)
Nobody has claimed this yet.
- Dominant language
- MoonScript
- Stars
- 201
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
For the cmd below, I would expect to get a `< HTTP/1.1 304 NOT MODIFIED` (previous run was just 5 seconds before that) instead of code 200:
```
curl http://luarocks.org/manifest -z repository/manifest.lua -o repository/manifest.lua --verbose --silent --location
* Adding handle: conn: 0x7fb440803000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fb440803000) send_pipe: 1, recv_pipe: 0
* About to connect() to luarocks.org port 80 (#0)
* Trying 45.33.61.132...
* Connected to luarocks.org (45.33.61.132) port 80 (#0)
> GET /manifest-5.1 HTTP/1.1
> User-Agent: curl/7.30.0
> Host: luarocks.org
> Accept: */*
> If-Modified-Since: Fri, 11 Sep 2015 19:04:12 GMT
>
< HTTP/1.1 200 OK
* Server nginx/1.6.3 is not blacklisted
< Server: nginx/1.6.3
< Date: Fri, 11 Sep 2015 19:04:15 GMT
< Content-Type: text/x-lua
< Content-Length: 259843
< Connection: keep-alive
< x-memory-cache-hit: 1
<
{ [data not shown]
* Connection #0 to host luarocks.org left intact
```
I am trying to figure out whenever the manifest gets updated so I can trigger a build step.
I can just download the manifest and compare hashes, but I am aiming at minimising data transfer.
Could this be fixed?
Alternatively, is there another mechanism in place to achieve the stated goal?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the conditional request against /manifest with the shown curl command, then trace the endpoint's nginx and cache configuration. Done means an unchanged manifest returns HTTP 304 for If-Modified-Since while an updated manifest returns 200, with both cases verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100