File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/main/java/com/ning/http/multipart Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,6 @@ public boolean isRepeatable() {
210
210
protected void sendStart (OutputStream out ) throws IOException {
211
211
out .write (EXTRA_BYTES );
212
212
out .write (getPartBoundary ());
213
- out .write (CRLF_BYTES );
214
213
}
215
214
216
215
/**
@@ -220,10 +219,13 @@ protected void sendStart(OutputStream out) throws IOException {
220
219
* @throws IOException If an IO problem occurs.
221
220
*/
222
221
protected void sendDispositionHeader (OutputStream out ) throws IOException {
223
- out .write (CONTENT_DISPOSITION_BYTES );
224
- out .write (QUOTE_BYTES );
225
- out .write (MultipartEncodingUtil .getAsciiBytes (getName ()));
226
- out .write (QUOTE_BYTES );
222
+ if (getName () != null ) {
223
+ out .write (CRLF_BYTES );
224
+ out .write (CONTENT_DISPOSITION_BYTES );
225
+ out .write (QUOTE_BYTES );
226
+ out .write (MultipartEncodingUtil .getAsciiBytes (getName ()));
227
+ out .write (QUOTE_BYTES );
228
+ }
227
229
}
228
230
229
231
/**
You can’t perform that action at this time.
0 commit comments