Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3782

Use the platform-specific line separator in Authorization header

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: Security
    • Labels:
      None
    • Environment:
      Windows

      Description

      Hello,

      I try to build the java driver with Windows.

      Failed Test due to line separator  :

      •  AuthorizationHeaderTest.testCreateCanonicalRequest

      org.junit.ComparisonFailure: expected:<...coded; charset=utf-8[
      host:iam.amazonaws.com
      x-amz-date:20150830T123600Z]
       
      content-type;host;...> but was:<...coded; charset=utf-8[
      host:iam.amazonaws.com
      x-amz-date:20150830T123600Z
      ]
       
      content-type;host;...>
      	at org.junit.Assert.assertEquals(Assert.java:115)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at com.mongodb.internal.connection.AuthorizationHeaderTest.testCreateCanonicalRequest(AuthorizationHeaderTest.java:138)

      * AuthorizationHeaderTest.testGetCanonicalHeaders

       

      org.junit.ComparisonFailure: expected:<...coded; charset=utf-8[
      host:iam.amazonaws.com
      my-header1:a b c
      my-header2:"a b c"
      x-amz-date:20150830T123600Z]
      > but was:<...coded; charset=utf-8[
      host:iam.amazonaws.com
      my-header1:a b c
      my-header2:"a b c"
      x-amz-date:20150830T123600Z
      ]
      >
      	at org.junit.Assert.assertEquals(Assert.java:115)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at com.mongodb.internal.connection.AuthorizationHeaderTest.testGetCanonicalHeaders(AuthorizationHeaderTest.java:105)

      I do a PR to fix this issue.

        Attachments

          Activity

            People

            Assignee:
            jeff.yemin Jeffrey Yemin
            Reporter:
            fares.hassak@gmail.com Farès Hassak
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: