Menu

#173 Corrupt HTTP header

WBEM_Services_1.0
open
Client API (46)
5
2008-04-01
2008-04-01
Patrik
No

Using other default Locales than English might corrupt the Date HTTP header when communicating with the CIM Server.

The problems occurs in the format "EEE, dd MMM yyyy HH:mm:ss 'GMT'" on row 53 in Header.Java in the package: javax.wbem.client.adapter.http.transport

For example, Monday in Swedish gets shortened to "Mån" which contains characters not accepted. The same problem might occur with the Month abbreviation.

Proposed solution:
Change the row 53 in Header.java to:

dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.ENGLISH);

And the addition of "import java.util.Locale;" of course.

-Patrik

Discussion


Log in to post a comment.