Skip to content

Commit

Permalink
Add Referer headers to POST requests
Browse files Browse the repository at this point in the history
  • Loading branch information
wingy committed Nov 12, 2014
1 parent adc5d22 commit e4bb2df
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,10 @@ public void sendReply(final Reply reply, final ReplyListener listener) {
Logger.i(TAG, "Sending reply request: " + reply.board + ", " + reply.resto);

HttpPost httpPost = new HttpPost(ChanUrls.getReplyUrl());
httpPost.addHeader("Referer", reply.resto > 0 ? ChanUrls.getThreadUrlDesktop(reply.board, reply.resto)
: ChanUrls.getBoardUrlDesktop(reply.board));

MultipartEntityBuilder entity = MultipartEntityBuilder.create();



entity.addTextBody("name", reply.name, TEXT_UTF_8);
entity.addTextBody("email", reply.email, TEXT_UTF_8);
entity.addTextBody("subject", reply.subject, TEXT_UTF_8);
Expand Down

0 comments on commit e4bb2df

Please sign in to comment.