Skip to content

Commit

Permalink
Issue happycodelucky#12 : add extra line after HTTP headers and add q…
Browse files Browse the repository at this point in the history
…uotes to the MAN header value
  • Loading branch information
FrankC committed Nov 13, 2018
1 parent 7dd4977 commit 5ade5ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SwiftSSDP/SSDPMSearchRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct SSDPMSearchRequest {
public var message: String {
var headers: SSDPHeaders = [
SSDPHeaderKeys.host: "\(SSDPDiscovery.ssdpHost):\(SSDPDiscovery.ssdpPort)",
SSDPHeaderKeys.man: self.man.rawValue,
SSDPHeaderKeys.man: "\"\(self.man.rawValue)\"",
SSDPHeaderKeys.maxWait: self.maxWaitTime.description,
SSDPHeaderKeys.searchTarget: self.searchTarget.description
]
Expand All @@ -41,6 +41,7 @@ public struct SSDPMSearchRequest {
for (key, value) in headers {
message.append("\(key): \(value)\r\n")
}
message.append("\r\n")
return message
}

Expand Down

0 comments on commit 5ade5ee

Please sign in to comment.