fungi8210 Posted January 30, 2008 Share Posted January 30, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/88569-sending-a-head-request-returns-407-proxy-authentication-required/ Share on other sites More sharing options...
madmax Posted January 31, 2008 Share Posted January 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/88569-sending-a-head-request-returns-407-proxy-authentication-required/#findComment-454591 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.