jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Jetty
  • Jetty
  • JETTY-378

encoding on zOS

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 6.1.4
  • Fix Version/s: 6.1.5rc0
  • Component/s: None
  • Labels:
    None
  • Environment:
    zOS
  • Number of attachments :
    0

Description

From jason randall:

I'm making a call to getRequestURL() on the Request object from a servlet
running on Jetty 6.1.1 on a z/OS machine running with uss using the default file
encoding which is Cp1047. This call returns almost everything correctly,
including the scheme, port and uri. However, the host name is encoded
improperly. So for example instead of getting the following:

http://mvsbuss:9080/redirect

I get:

http://_˚:9080/redirect

It looks like the getServerName in org.mortbay.jetty.Request is assuming the
value in the Host HTTP Header is using the mainframe's default system encoding.
AbstractBuffer.toString() does not provide a character encoding option other
than the system's character encoding. Whereas when determining the
Request.getResultURI() a UTF-8 encoding scheme is used no matter what the
system's encoding is set.

I do have a workaround for this issue by re-encoding the server name using UTF-8
however I get a similar issue when the DefaultServlet (makes a call to
passConditionalHeaders) attempts to parse the value in the If-Modified-Since
header as a date but the string was encoding using the system default and a
java.lang.IllegalArgumentException: Cannot convert date is thrown.

I would rather not set the file.encoding system property to UTF-8 because then
my log files will not be readable on the z/OS machine. This was working
properly in Jetty 4.1 without having to set the file.encoding property.

Any insight into a possible work aroud for this would be appreciated.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Greg Wilkins added a comment - 26/Jun/07 8:53 PM

Jason,

I have checked in what should be at least a partial fix for this issue.
But, a larger audit/test would be needed to confirm all functions operate
correctly.

Show
Greg Wilkins added a comment - 26/Jun/07 8:53 PM Jason, I have checked in what should be at least a partial fix for this issue. But, a larger audit/test would be needed to confirm all functions operate correctly.
Hide
Permalink
Greg Wilkins added a comment - 01/Jul/07 8:29 PM

If you can confirm this works for you, I'll mark this resolved.

Show
Greg Wilkins added a comment - 01/Jul/07 8:29 PM If you can confirm this works for you, I'll mark this resolved.
Hide
Permalink
Jason Randall added a comment - 06/Jul/07 11:23 AM

Greg,

The fix looks good. When do think it will make into an official release? Will it be in 6.1.5?

Show
Jason Randall added a comment - 06/Jul/07 11:23 AM Greg, The fix looks good. When do think it will make into an official release? Will it be in 6.1.5?
Hide
Permalink
Greg Wilkins added a comment - 08/Jul/07 7:19 PM

yes it will be in 6.1.5, which should be next week.

Show
Greg Wilkins added a comment - 08/Jul/07 7:19 PM yes it will be in 6.1.5, which should be next week.

People

  • Assignee:
    Unassigned
    Reporter:
    Greg Wilkins
Vote (0)
Watch (1)

Dates

  • Created:
    26/Jun/07 3:46 PM
    Updated:
    08/Jul/07 7:19 PM
    Resolved:
    08/Jul/07 7:19 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.