?
Solved

Problem using HTTP 1.1 request

Posted on 2006-04-16
5
Medium Priority
?
260 Views
Last Modified: 2010-03-18
I'm writing an application which requests web data using the C socket library.

There must be something wrong with my requests, because they only work when I use HTTP 1.0, but when I use 1.1 they either hang, or else return slightly corrupted results.

Here's a typical request header my program generates:

GET / HTTP/1.1
Host: www.myhost.com
User-agent: MyApp 1.0;
Accept: text/html, text/xml, text/plain
0
Comment
Question by:chsalvia
3 Comments
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16467156
chsalvia, I would better post my question in Linux Programming

http://www.experts-exchange.com/Programming/Programming_Platforms/Linux_Programming/
0
 
LVL 3

Accepted Solution

by:
karelrambousek earned 500 total points
ID: 16467745
Hello,
try to play with:
Accept-Encoding and Accept headers in request
for example Accept: text/plain
and you'll get uncompressed output.
-K-

0
 
LVL 3

Assisted Solution

by:abusimbel
abusimbel earned 500 total points
ID: 16467776
Hello chsalvia,

GET / HTTP/1.1
Host: www.myhost.com
/l/r
/l/r

Should be enough to get a correct answer from any server with HTTP 1.1, remove or play with the UserAgent.

Regards,
Abusimbel.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question