Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8219117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:02:56+00:00 2026-06-07T13:02:56+00:00

my problem is two different responses. There is part of my code which sends

  • 0

my problem is two different responses.

There is part of my code which sends a request.

boost::asio::ip::tcp::iostream stream;
stream.expires_from_now(boost::posix_time::seconds(60));
stream.connect("www.mail.ru","http");
stream << "GET /cgi-bin/msglist HTTP/1.1\r\n";
stream << "Host: e.mail.ru\r\n";
stream << "Connection: keep-alive\r\n";
stream << "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11\r\n";
stream << "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
stream << "Referer: http://mail.ru/ \r\n";
stream << "Accept-Encoding: gzip,deflate,sdch\r\n";
stream << "Accept-Language: en-US,en;q=0.8\r\n";
stream << "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\n";
stream << "Cookie: Cookie here \r\n\r\n";


Such a response from the server I get from the code

HTTP/1.1 302 OK

Date: Fri, 13 Jul 2012 19:00:06 GMT

Server: Apache/1.3.27 (Unix) mru_xml/0.471 gorgona/2.1 mod_jk/1.2.4 mod_ruby/1.0.7 Ruby/1.6.8 mod_mrim/0.17

Connection: close

Location: http://e.mail.ru/cgi-bin/msglist

Content-Length: 0

Content-Type: text/plain

But when i do same request from my browser with same header i I get

this response

//HTTP/1.1 200 OK
//Server: nginx/0.7.62
//Date: Fri, 13 Jul 2012 18:50:46 GMT
///Content-Type: text/html; charset=utf-8
//Connection: close
//P3P: CP="NON CUR OUR IND UNI INT"
//Cache-Control: no-cache,no-store,must-revalidate
//Pragma: no-cache
//Expires: Thu, 14 Jul 2011 18:50:46 GMT
//Last-Modified: Fri, 13 Jul 2012 22:50:46 GMT
//X-Host: f306.mail.ru
//Content-Length: 461042

so what wrong with my code?(i need to get response 200 from my code)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:02:59+00:00Added an answer on June 7, 2026 at 1:02 pm

    302 is found, in location there is redirect link. http://en.wikipedia.org/wiki/HTTP_302
    You should get url from location and make other request to this url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem is to access a series of values by two different methods. First,
i have a problem concerning a select query in MYSQL i have two different
Here's the problem. I've got two different technologies needing drivers to access a PostgreSQL
I have a small problem with Smarty... I have two different template files in
I am getting responses from two different web services in XML format. Both web
I'm having problem with asynctasks and http requests. The user can press two different
i have a problem with boost condition, i have these two instance variable within
We are having problems with understanding the different between the QUORUM and TWO ConsistencyLevel
I have a problem. I have two refresh button in differents activities that It
I Have two problem in this Case : I want to pass a JSON

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.