@@ -105,13 +105,13 @@ public final void sendResponseMessage(HttpResponse response) throws IOException
105
105
if (contentTypeHeaders .length != 1 ) {
106
106
//malformed/ambiguous HTTP Header, ABORT!
107
107
sendFailureMessage (
108
+ status .getStatusCode (),
109
+ response .getAllHeaders (),
110
+ null ,
111
+ new HttpResponseException (
108
112
status .getStatusCode (),
109
- response .getAllHeaders (),
110
- null ,
111
- new HttpResponseException (
112
- status .getStatusCode (),
113
- "None, or more than one, Content-Type Header found!"
114
- )
113
+ "None, or more than one, Content-Type Header found!"
114
+ )
115
115
);
116
116
return ;
117
117
}
@@ -129,13 +129,13 @@ public final void sendResponseMessage(HttpResponse response) throws IOException
129
129
if (!foundAllowedContentType ) {
130
130
//Content-Type not in allowed list, ABORT!
131
131
sendFailureMessage (
132
+ status .getStatusCode (),
133
+ response .getAllHeaders (),
134
+ null ,
135
+ new HttpResponseException (
132
136
status .getStatusCode (),
133
- response .getAllHeaders (),
134
- null ,
135
- new HttpResponseException (
136
- status .getStatusCode (),
137
- "Content-Type not allowed!"
138
- )
137
+ "Content-Type (" + contentTypeHeader .getValue () + ") not allowed!"
138
+ )
139
139
);
140
140
return ;
141
141
}
0 commit comments