Skip to content

Commit 4257390

Browse files
committedJun 28, 2024
[bugfix] Fix an issue with setting headers in Post and Put responses
Closes #51
1 parent 3c01725 commit 4257390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎http-client-java/src/main/java/org/expath/httpclient/impl/RequestParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ else if ( "chunked".equals(local) ) {
148148
// walk the elements
149149
// TODO: Check element structure validity (header*, (multipart|body)?)
150150
HeaderSet headers = new HeaderSet();
151+
req.setHeaders(headers);
151152
for ( Element child : myRequest.children() ) {
152153
String local = child.getLocalName();
153154
String ns = child.getNamespaceUri();
@@ -173,7 +174,6 @@ else if ( "body".equals(local) || "multipart".equals(local) ) {
173174
throw new HttpClientException(HttpClientError.HC005, "Unknown element: " + local);
174175
}
175176
}
176-
req.setHeaders(headers);
177177

178178
return req;
179179
}

0 commit comments

Comments
 (0)
Please sign in to comment.