Skip to content

Commit

Permalink
bump Wiki.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbe98 committed Oct 29, 2021
1 parent bc2887e commit c1f8d02
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/org/wikipedia/Wiki.java
Original file line number Diff line number Diff line change
Expand Up @@ -8128,13 +8128,11 @@ public String makeApiCall(Map<String, String> getparams, Map<String, Object> pos
// now we know how we're sending it, construct the post body
if (multipart)
{
byte[] nextpart = ("--" + boundary + "\r\n\"Content-Disposition: form-data; name=\\\"\"")
.getBytes(StandardCharsets.UTF_8);
String nextpart = "--" + boundary + "\r\nContent-Disposition: form-data; name=\"";
for (Map.Entry<String, ?> entry : postparams.entrySet())
{
multipartPostBody.add(nextpart);
Object value = entry.getValue();
multipartPostBody.add((entry.getKey() + "\"\r\n").getBytes(StandardCharsets.UTF_8));
multipartPostBody.add((nextpart + entry.getKey() + "\"").getBytes(StandardCharsets.UTF_8));
if (value instanceof String)
multipartPostBody.add(("Content-Type: text/plain; charset=UTF-8\r\n\r\n" + (String)value + "\r\n")
.getBytes(StandardCharsets.UTF_8));
Expand Down

0 comments on commit c1f8d02

Please sign in to comment.