Jump to content
Ketarin forum

http HEAD requests


code-breaker
 Share

Recommended Posts

I contacted an author about making the program version more easily accessible on one of his webpages, because he uses a php download script. He suggested using an http HEAD request on the download link, which returns, among other things, the filename including the version number in the Content-Disposition header. In fact, in a lot of ways this is an ideal way to do this. It would work great, but ketarin would need to be able to do HEAD requests.

Link to comment
Share on other sites

Works fine here (with the DL URL you have just provided). =)

 

 

09-04-2009 21:25:52: Update started with 1 application(s)

09-04-2009 21:25:58: Zindus: Server source file: /download/addon

09-04-2009 21:25:58: Zindus: Determined target file name: D:\Programas\Test\zindus-0.8.9-tb+sm.xpi

09-04-2009 21:25:58: Zindus: Checking if update is required...

09-04-2009 21:25:58: Zindus: Update required, 'D:\Programas\Test\zindus-0.8.9-tb+sm.xpi' does not yet exist

09-04-2009 21:26:05: Update finished

Edited by FranciscoR
Link to comment
Share on other sites

I wasn't trying to say that I couldn't get the download to work. I was simply saying that an efficient way to get version number in the case of download scripts is as the software author suggested, using a HEAD request. I noticed the relatively recent ability to do a POST, and thought it might be useful.

Link to comment
Share on other sites

using a HEAD request

Thanks for the 'HEADs up' on this code-breaker! LOL

Using Ketarin you can't get filename and version with the same variable' date=' so even if you could use the HTTP response header, you would need a second and a third variables to capture filename and version. Not a big advantage... =( IMO we should focus on DLs that don't work and in Ketarin's USABILITY, this feature could be nice but it is not a priority.

 

-------------------------------

 

Current content-disposition:

 

- Http: Response, HTTP/1.1, Status Code = 200, URL: /download/xpi/zindus-0.8.9-tb+sm.xpi

ProtocolVersion: HTTP/1.1

StatusCode: 200, Ok

Reason: OK

Date: Fri, 10 Apr 2009 13:15:03 GMT

Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch7

Last-Modified: Mon, 23 Mar 2009 20:58:03 GMT

ETag: "202c7-3a537-85b96cc0"

Accept-Ranges: bytes

ContentLength: 238903

Cache-control: max-age=0, no-cache, no-store, must-revalidate

Pragma: no-cache

Expires: Fri May 16 19:36:50 EST 2008

[b']content-disposition: attachment; filename="zindus-0.8.9-tb+sm.xpi" [/b]

Keep-Alive: timeout=15, max=99

Connection: Keep-Alive

ContentType: application/x-xpinstall

HeaderEnd: CRLF

- payload: HttpContentType = application/x-xpinstall

HTTPPayloadLine: PK

Edited by FranciscoR
Link to comment
Share on other sites

Not a big advantage...

 

For you.

 

this feature could be nice but it is not a priority

 

For you.

 

This is an open source project. I added some info that I don't have time to implement, but I thought that someone else might think is a possibly interesting feature. If you don't agree, then don't implement it. But how is adding your opinion on the priority of this or that feature helping anyone? Again, this is open source. If someone wants to work on a feature that they find interesting or useful, they will. If its not particularly useful to you, well, no harm no foul. That's how open source works.

 

Ease up, man. Relax.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.