bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22766] Make HTTP requests more standards-compliant


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22766] Make HTTP requests more standards-compliant
Date: 16 Oct 2005 01:27:05 -0000

A HTTP URLConnection sends headers with some lower-case letters instead of
upper case letters. We should use the same spelling as in RFC 2616.

In gnu/java/net/protocol/http/Connection.java, this should be changed:

"user-agent" -> "User-Agent"
"accept" -> "Accept"
"Content-type" -> "Content-Type"
"Content-length" -> "Content-Length"


You may say that this is not important, but look at this code:

URLConnection u = ...;
u.setRequestProperty("User-Agent", "MyAgent/1.0");

This works with Sun's class library. With Classpath, these two headers are in
the same request:

User-Agent: MyAgent/1.0
user-agent: gnu-libgcj/3.4.0 20040316 (prerelease)


------- Comment #1 from from-classpath at savannah dot gnu dot org  2004-12-01 
12:50 -------
The merging of the new HTTP protocol implemention from GNU inetleib fixed this
problem. It's commmited to CVS and will be fixed in GNU classpath 0.13.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22766





reply via email to

[Prev in Thread] Current Thread [Next in Thread]