Hi guys
For some reasons, my Controller Method is never going to be called, instead I get a Action Not Found Response.
Normal File Upload using multipart/form-data on the other hand, works perfect. Those a are the RAW Request and Partial Responses captured
using an intercepting proxy:
I can hardly see any difference (there are differences but those are of very minor nature in my opinion)...
Do you guys have any idea, any help would be greatly appreciated :-)
Best regards
Samuel
Conventional multipart/form-data
######################################################
Request
****************************************************************************
POST /media/upload HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 685
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin:
http://localhost:8080User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarykAmdZenxGi9IQoIj
Referer:
http://localhost:8080/media/newAccept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: PLAY_SESSION=6f7e8949f37f520d1de2b6135cc7485be3bbaa74-ProfileID%3A1
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="media-caption"
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="media-description"
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="media-language"
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="media-country"
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="media-city"
------WebKitFormBoundarykAmdZenxGi9IQoIj
Content-Disposition: form-data; name="cover"; filename="a.txt"
Content-Type: text/plain
WTF
------WebKitFormBoundarykAmdZenxGi9IQoIj--
Response
****************************************************************************
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 30
{"files":[{"name":"Hua.jpg"}]}
######################################################
Request
****************************************************************************
POST /media/upload/ HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 685
Accept: text/html, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryxguCvmWrHSOmhlIX
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: PLAY_SESSION=6f7e8949f37f520d1de2b6135cc7485be3bbaa74-ProfileID%3A1
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="media-caption"
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="media-description"
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="media-language"
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="media-country"
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="media-city"
------WebKitFormBoundaryxguCvmWrHSOmhlIX
Content-Disposition: form-data; name="cover"; filename="a.txt"
Content-Type: text/plain
WTF
------WebKitFormBoundaryxguCvmWrHSOmhlIX--
Response
****************************************************************************
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 9730
<!DOCTYPE html>
<html>
<head>
<title>Action not found</title>