Jump to content
  • Advertisement
Sign in to follow this  
ArchG

GET Request not returning what it should

This topic is 4823 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've recently made a small program that connects to a server and does a GET Request, but it often returns kinda crazy results, like for example this: Connect to: www.metroeguide.net Get Request: "GET /admin.asp HTTP/1.1\r\nHost:me.me.com\r\n\r\n" It will return me a 415 Unsupported Media message, but if you browse there in IE or any other browser (www.metroeguide.net/admin.asp), that is obviously not the case. It is something to do with the headers i'm sending? (I truthfully have no idea what i'm suppose to send in that part.) It also screw up on many other websites Any help would be great, thanks! [Edited by - ArchG on June 5, 2005 8:29:03 PM]

Share this post


Link to post
Share on other sites
Advertisement
lol, thanks, i've been screwin up those their there and they're s lately

Corrections made

ratings++

Share this post


Link to post
Share on other sites
Well, first, the page forwards you to /admin/admin.asp, so you should try there instead.
second: Host:me.me.com should be changed! Host:www.metroeguide.net is the host.

web sniffer This helped me figure out how the header should be formed.

Share this post


Link to post
Share on other sites
Whatever docs you are using to learn the HTTP 1.1 protocol, throw them out. The field "host" (required in 1.1) refers to the host you are contacting, meaning it should be www.metroeguide.net

I suggest you read something like HTTP Made Really Easy, or even consider making simplier HTTP 1.0 requests unless you have a need for persistent connections and are going to be supporting all the 1.1 encoding and connection related complexity.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!