@@ -82,6 +82,7 @@ public enum HttpResponse {
8282 case switchProtocols( [ String : String ] , ( Socket ) -> Void )
8383 case ok( HttpResponseBody ) , created, accepted
8484 case movedPermanently( String )
85+ case movedTemporarily( String )
8586 case badRequest( HttpResponseBody ? ) , unauthorized, forbidden, notFound
8687 case internalServerError
8788 case raw( Int , String , [ String : String ] ? , ( ( HttpResponseBodyWriter ) throws -> Void ) ? )
@@ -93,6 +94,7 @@ public enum HttpResponse {
9394 case . created : return 201
9495 case . accepted : return 202
9596 case . movedPermanently : return 301
97+ case . movedTemporarily : return 307
9698 case . badRequest( _) : return 400
9799 case . unauthorized : return 401
98100 case . forbidden : return 403
@@ -109,6 +111,7 @@ public enum HttpResponse {
109111 case . created : return " Created "
110112 case . accepted : return " Accepted "
111113 case . movedPermanently : return " Moved Permanently "
114+ case . movedTemporarily : return " Moved Temporarily "
112115 case . badRequest( _) : return " Bad Request "
113116 case . unauthorized : return " Unauthorized "
114117 case . forbidden : return " Forbidden "
@@ -133,6 +136,8 @@ public enum HttpResponse {
133136 }
134137 case . movedPermanently( let location) :
135138 headers [ " Location " ] = location
139+ case . movedTemporarily( let location) :
140+ headers [ " Location " ] = location
136141 case . raw( _, _, let rawHeaders, _) :
137142 if let rawHeaders = rawHeaders {
138143 for (k, v) in rawHeaders {
0 commit comments