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

Use the platform-specific line separator in Authorization header

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

      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.

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

              Created:
              Updated:
              Resolved: