Skip to content

Commit 3fe0195

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: src/com/loopj/android/http/SimpleMultipartEntity.java
2 parents e16e3dc + 4b6eb97 commit 3fe0195

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.classpath

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
<classpathentry kind="src" path="src"/>
66
<classpathentry kind="src" path="gen"/>
77
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
8+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
89
<classpathentry kind="output" path="bin/classes"/>
910
</classpath>

src/com/loopj/android/http/SimpleMultipartEntity.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,22 @@ public SimpleMultipartEntity(AsyncHttpResponseHandler progressHandler) {
8383
this.progressHandler = progressHandler;
8484
}
8585

86-
public void addPart(final String key, final String value) {
86+
public void addPart(final String key, final String value, final String contentType) {
8787
try {
8888
out.write(boundaryLine);
8989
out.write(createContentDisposition(key));
90+
out.write(createContentType(contentType));
9091
out.write(CR_LF);
9192
out.write(value.getBytes());
9293
out.write(CR_LF);
9394
} catch (final IOException e) {
9495
// Can't happen on ByteArrayOutputStream
9596
}
9697
}
98+
99+
public void addPart(final String key, final String value) {
100+
addPart(key, value, "text/plain; charset=UTF-8");
101+
}
97102

98103
public void addPart(String key, File file) {
99104
addPart(key, file, null);

0 commit comments

Comments
 (0)