Skip to content

Commit

Permalink
User-agent header -> Soto/6.0 (#483)
Browse files Browse the repository at this point in the history
* User-agent header -> Soto/6.0

* FIx test to check for Soto/6.0
  • Loading branch information
adam-fowler authored Nov 23, 2021
1 parent 22b517c commit 97bdcfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SotoCore/Message/AWSRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ extension AWSRequest {

/// Add headers standard to all requests "content-type" and "user-agent"
private mutating func addStandardHeaders() {
httpHeaders.replaceOrAdd(name: "user-agent", value: "Soto/5.0")
httpHeaders.replaceOrAdd(name: "user-agent", value: "Soto/6.0")
guard httpHeaders["content-type"].first == nil else {
return
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/SotoCoreTests/AWSClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class AWSClientTests: XCTestCase {
XCTAssertEqual(httpHeaders?["content-type"].first, "application/x-amz-json-1.1")
XCTAssertNotNil(httpHeaders?["authorization"].first)
XCTAssertNotNil(httpHeaders?["x-amz-date"].first)
XCTAssertEqual(httpHeaders?["user-agent"].first, "Soto/5.0")
XCTAssertEqual(httpHeaders?["user-agent"].first, "Soto/6.0")
XCTAssertEqual(httpHeaders?["host"].first, "localhost:\(awsServer.serverPort)")
}

Expand Down

0 comments on commit 97bdcfd

Please sign in to comment.