Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
test:
runs-on: macos-latest
runs-on: macos-26

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5
// swift-tools-version:6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
12 changes: 6 additions & 6 deletions Sources/SimpleHTTP/MultipartForm/MultipartFormData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MobileCoreServices
import CoreServices
#endif

struct Header: Hashable {
struct Header: Hashable, Sendable {
let name: HTTPHeader
let value: String
}
Expand All @@ -16,9 +16,9 @@ enum EncodingCharacters {
static let crlf = "\r\n"
}

enum Boundary {
enum Boundary: Sendable {

enum `Type` {
enum `Type`: Sendable {
case initial
case encapsulated
case final
Expand Down Expand Up @@ -49,19 +49,19 @@ enum Boundary {
struct BodyPart {
let headers: [Header]
let length: Int
let stream: () throws -> InputStream
let stream: @Sendable () throws -> InputStream

var hasInitialBoundary = false
var hasFinalBoundary = false

private init(headers: [Header], stream: @escaping () throws -> InputStream, length: Int) {
private init(headers: [Header], stream: @Sendable @escaping () throws -> InputStream, length: Int) {
self.headers = headers
self.length = length
self.stream = stream
}

init(headers: [Header], url: URL, length: Int) {
let stream: () throws -> InputStream = {
let stream: @Sendable () throws -> InputStream = {
guard let stream = InputStream(url: url) else {
throw MultipartFormData.Error.inputStreamCreationFailed(url)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SimpleHTTP/Request/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
///
/// let user: Path = .myPaths.user
/// ```
public struct Path: Equatable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
public struct Path: Equatable, Sendable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
/// relative path
public let value: String

Expand Down
2 changes: 1 addition & 1 deletion Sources/SimpleHTTP/Request/Request.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public enum Method: String {
public enum Method: String, Sendable {
case get
case post
case put
Expand Down
2 changes: 1 addition & 1 deletion Sources/SimpleHTTP/Response/DataResponse.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public struct URLDataResponse {
public struct URLDataResponse: Sendable {
public let data: Data
public let response: HTTPURLResponse

Expand Down
2 changes: 1 addition & 1 deletion Sources/SimpleHTTPFoundation/HTTP/HTTPContentType.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// A struct representing a http header content type value
public struct HTTPContentType: Hashable, ExpressibleByStringLiteral {
public struct HTTPContentType: Hashable, Sendable, ExpressibleByStringLiteral {
public let value: String

public init(value: String) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Foundation
public typealias HTTPHeaderFields = [HTTPHeader: String]

/// A struct representing a http request header key
public struct HTTPHeader: Hashable, ExpressibleByStringLiteral {
public struct HTTPHeader: Hashable, Sendable, ExpressibleByStringLiteral {
public let key: String

public init(stringLiteral value: StringLiteralType) {
Expand All @@ -17,7 +17,7 @@ extension HTTPHeader {
public static let authentication: Self = "Authentication"
public static let authorization: Self = "Authorization"
public static let contentType: Self = "Content-Type"
public static var contentDisposition: Self = "Content-Disposition"
public static let contentDisposition: Self = "Content-Disposition"
}

// swiftlint:disable line_length
Expand Down
Loading