Unofficial parts once again being redirected to https


RE: Unofficial parts once again being redirected to https
#19
(2024-01-29, 20:37)Orion Pobursky Wrote: The "If-Modified-Since" response likely hasn't existed since we switched to the new PT software. I've, hopefully, added it back in and corrected the malformed date format.

I was able to test today, and If-Modified-Since appears to still not be working. You can test this yourself using the following command line:

Code:
curl -I --header 'If-Modified-Since: Mon, 07 Aug 2023 18:57:57 +0000' https://library.ldraw.org/library/unofficial/parts/2676.dat

The above instructs curl to just fetch the response headers. You will see that the response code is 200, and the "Last-Modified" header exactly matches the date the If-Modified-Since value that I used above. The goal is for the above request to produce a 304 Not Modified response.

Note that I tested a similar command to the above on Curl's web site, and it returns a 304 response code:

Code:
curl -I --header 'If-Modified-Since: Tue, 30 Jan 2024 11:05:02 GMT' https://curl.se

The above returned the following:

Code:
HTTP/1.1 304 Not Modified
Connection: keep-alive
Date: Wed, 31 Jan 2024 02:13:12 GMT
Via: 1.1 varnish
Cache-Control: max-age=60
ETag: W/"21ee-61027bbe66889"
Expires: Tue, 30 Jan 2024 11:06:02 GMT
Age: 26
X-Served-By: cache-lax-kwhp1940114-LAX
X-Cache: HIT
X-Cache-Hits: 1
X-Timer: S1706667192.147787,VS0,VE1
Vary: Accept-Encoding
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400

Since curl.se could update at any time, you may get a 200 response if you run the same command. But if you then copy and paste that result's Last-Modified date into the curl command, it should give you a 304 response.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Unofficial parts once again being redirected to https - by Travis Cobbs - 2024-01-31, 2:16

Forum Jump:


Users browsing this thread: 4 Guest(s)