T
Tim
Hi,
I have written a simple API in ASP.Net (VB) .Net framework 3.5 for an iPhone
application to integrate to our customers product. This includes uploading
pictures and audio files using 'multipart/form-data'....
On some iPhones it works fine (inc the developers) but on others it fails as
ASP fails to recognise the data as a form (i.e. Request.Form.Count is 0)
I believe this is due to the fact that on the failing iPhones the boundary
definition is not at the end of the content-type line or doesnt have double
quotes around.
i.e. This is a working Content-Type
'multipart/form-data; charset=utf-8; boundary=0xKhTmLbOuNdArY'
This is the failing version
'multipart/form-data;boundary=0xKhTmLbOuNdArY; charset=utf-8'
I've failed to get the iPhone developer to try to make sure the boundary is
at the end of the line, remove the charset, or to put double quotes around
the boundary (I think that would work).
Unfortunately when I tried to use specification to back up how ASP was
working I found that it looks like ASP may be wrong? RFC 2046, section 5.1.1:
does not include the ";" as a valid boundary character so I would expect it
to still recognise it as the section termination. However I cant find
anything definitive on this behaviour.
So my questions are:
[1] Is ASP handling this correctly or not and if so by what spec/rfc?
[2] Is there a way to get ASP to recognise this input without parsing the
total content stream myself?
Cheers
I have written a simple API in ASP.Net (VB) .Net framework 3.5 for an iPhone
application to integrate to our customers product. This includes uploading
pictures and audio files using 'multipart/form-data'....
On some iPhones it works fine (inc the developers) but on others it fails as
ASP fails to recognise the data as a form (i.e. Request.Form.Count is 0)
I believe this is due to the fact that on the failing iPhones the boundary
definition is not at the end of the content-type line or doesnt have double
quotes around.
i.e. This is a working Content-Type
'multipart/form-data; charset=utf-8; boundary=0xKhTmLbOuNdArY'
This is the failing version
'multipart/form-data;boundary=0xKhTmLbOuNdArY; charset=utf-8'
I've failed to get the iPhone developer to try to make sure the boundary is
at the end of the line, remove the charset, or to put double quotes around
the boundary (I think that would work).
Unfortunately when I tried to use specification to back up how ASP was
working I found that it looks like ASP may be wrong? RFC 2046, section 5.1.1:
does not include the ";" as a valid boundary character so I would expect it
to still recognise it as the section termination. However I cant find
anything definitive on this behaviour.
So my questions are:
[1] Is ASP handling this correctly or not and if so by what spec/rfc?
[2] Is there a way to get ASP to recognise this input without parsing the
total content stream myself?
Cheers