comparison src/luan/modules/url/MultipartClient.java @ 1165:668f29bc52ea

clean up content-type
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 07 Feb 2018 23:16:12 -0700
parents 1a68fc55a80c
children 383f924dfe9d
comparison
equal deleted inserted replaced
1164:1f9d34a6f308 1165:668f29bc52ea
44 44
45 public OutputStream write(HttpURLConnection httpCon) throws IOException { 45 public OutputStream write(HttpURLConnection httpCon) throws IOException {
46 String boundary = "luan" + System.identityHashCode(this) + Long.toString(System.currentTimeMillis(),36); 46 String boundary = "luan" + System.identityHashCode(this) + Long.toString(System.currentTimeMillis(),36);
47 byte[] boundaryBytes = boundary.getBytes(__ISO_8859_1); 47 byte[] boundaryBytes = boundary.getBytes(__ISO_8859_1);
48 48
49 httpCon.setRequestProperty("Content-Type","multipart/form-data; boundary="+boundary); 49 httpCon.setRequestProperty("content-type","multipart/form-data; boundary="+boundary);
50 OutputStream out = httpCon.getOutputStream(); 50 OutputStream out = httpCon.getOutputStream();
51 for( Object hack : params.entrySet() ) { 51 for( Object hack : params.entrySet() ) {
52 Map.Entry entry = (Map.Entry)hack; 52 Map.Entry entry = (Map.Entry)hack;
53 String name = (String)entry.getKey(); 53 String name = (String)entry.getKey();
54 List list = (List)entry.getValue(); 54 List list = (List)entry.getValue();