Skip to content

Commit

Permalink
Merge pull request square#10 from square/fix-encoding-ray
Browse files Browse the repository at this point in the history
Fixes failure to transmit interesting unicode characters
  • Loading branch information
pforhan committed Nov 9, 2011
2 parents 66efefb + a60086b commit 62d56c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/http/src/retrofit/http/HttpMethodType.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.protocol.HTTP;
import retrofit.io.TypedBytes;

/**
Expand Down Expand Up @@ -135,7 +136,8 @@ private static void addParams(HttpEntityEnclosingRequestBase request,
} else {
try {
List<NameValuePair> paramList = builder.getParamList(true);
request.setEntity(new UrlEncodedFormEntity(paramList));
// TODO: Use specified encoding. (See CallbackResponseHandler et al)
request.setEntity(new UrlEncodedFormEntity(paramList, HTTP.UTF_8));
} catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
Expand Down

0 comments on commit 62d56c2

Please sign in to comment.