Jump to content

Recommended Posts

Hi,

    I'm trying to send a HEAD request to a webserver to query a file's meta data.

I used telnet to connect to my remote webserver as such

 

> telnet kitty.2y.idv.tw 80

 

I then typed a HEAD request message as

 

HEAD http://kitty.2y.idv.tw/pro/she.3gp HTTP/1.1

Host: kitty.2y.idv.tw

 

but It returns 407 Authentication Required.

 

If instead, I sent my HEAD request as

 

HEAD /pro/she.3gp HTTP/1.1

Host: kitty.2y.idv.tw

 

I will successfully received the HEAD response.

 

Can anybody explain to me why this is happening?

This only happens to kitty.2y.idv.tw, I tried it on other webserver and it works file with absolute URI

 

So which URI is the legitmate one to use? Absolute URI or Relative URI?

 

thanks!

I'd guess (and it is only a guess) that the message should be self-explanatory and that the different form triggers a proxy routing on that server due to a malformed HEAD resource request.

 

If the URI which omits the server name doesn't trigger the proxy request I'd go with that if it raises no other side issues. The RFCs seem as clear as mud here but maybe you might check them over?

 

Header Field Definitions RFC http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

 

HEAD http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

 

HEAD http://en.wikipedia.org/wiki/HTTP#Request_Methods

 

http://gbiv.com/protocols/uri/rfc/rfc3986.html#generic-syntax

 

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.