Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2995

If-Modified-Since is formatted date string but DefaultHttpHeaderMapper is handling it as long value and causes NumberFormatException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.2.3
    • Fix Version/s: 3.0 M3
    • Component/s: HTTP Support
    • Labels:

      Description

      'if-Modified-Since' in HTTP header is supposed to have something like below.

      If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT

      But DefaultHttpHeaderMapper is just trying to cast it to long value and it causes NumberFormatException.

      Caused by: java.lang.NumberFormatException: For input string: "Mon, 25 Mar 2013 19:02:15 GMT"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) ~[na:1.6.0_34]
      	at java.lang.Long.parseLong(Long.java:410) ~[na:1.6.0_34]
      	at java.lang.Long.parseLong(Long.java:468) ~[na:1.6.0_34]
      	at org.springframework.integration.http.support.DefaultHttpHeaderMapper.setHttpHeader(DefaultHttpHeaderMapper.java:681) ~[spring-integration-http-2.2.3.RELEASE.jar:na]
      	at org.springframework.integration.http.support.DefaultHttpHeaderMapper.fromHeaders(DefaultHttpHeaderMapper.java:333) ~[spring-integration-http-2.2.3.RELEASE.jar:na]
      	at org.springframework.integration.http.support.DefaultHttpHeaderMapper.fromHeaders(DefaultHttpHeaderMapper.java:63) ~[spring-integration-http-2.2.3.RELEASE.jar:na]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abilan Artem Bilan
                Reporter:
                sinihong Shinki Hong
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: