From c265454f54a752b47f5f6139b11c8737f56f4201 Mon Sep 17 00:00:00 2001 From: Amin Cheloh Date: Thu, 25 Sep 2014 19:43:38 +0700 Subject: [PATCH] fix charset from utf8 to utf-8 --- .../com/koushikdutta/async/http/body/UrlEncodedFormBody.java | 2 +- .../async/http/server/AsyncHttpServerResponseImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AndroidAsync/src/com/koushikdutta/async/http/body/UrlEncodedFormBody.java b/AndroidAsync/src/com/koushikdutta/async/http/body/UrlEncodedFormBody.java index 7bceceb89..1c9cbc6c0 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/body/UrlEncodedFormBody.java +++ b/AndroidAsync/src/com/koushikdutta/async/http/body/UrlEncodedFormBody.java @@ -59,7 +59,7 @@ public void write(AsyncHttpRequest request, final DataSink response, final Compl public static final String CONTENT_TYPE = "application/x-www-form-urlencoded"; @Override public String getContentType() { - return CONTENT_TYPE + "; charset=utf8"; + return CONTENT_TYPE + "; charset=utf-8"; } @Override diff --git a/AndroidAsync/src/com/koushikdutta/async/http/server/AsyncHttpServerResponseImpl.java b/AndroidAsync/src/com/koushikdutta/async/http/server/AsyncHttpServerResponseImpl.java index bd7211bdb..9faa3658e 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/server/AsyncHttpServerResponseImpl.java +++ b/AndroidAsync/src/com/koushikdutta/async/http/server/AsyncHttpServerResponseImpl.java @@ -206,13 +206,13 @@ public void send(String string) { responseCode(200); String contentType = mRawHeaders.get("Content-Type"); if (contentType == null) - contentType = "text/html; charset=utf8"; + contentType = "text/html; charset=utf-8"; send(contentType, string); } @Override public void send(JSONObject json) { - send("application/json; charset=utf8", json.toString()); + send("application/json; charset=utf-8", json.toString()); } @Override