I think it is a good idea. The only thing you should check before going for
it is what other clients are doing. Some times what is in the RFC is not
what has been implemented in reality. This can mean that if you start
following the RFC spec, you end up breaking some clients in the process,
which can be why such things are left out. In general, multipart is an
angry beehive of stuff.



On Mon, Feb 6, 2017 at 10:54 AM Manlio Perillo <manlio.peri...@gmail.com>
wrote:

> Hi.
>
> I have noted that the implementation of multipart.Reader.ReadForm *knows*
> the size of
> a file, but it just discards it.   Isn't it better if it make it available
> as a field in the FileHeader
> or, probably better as an additional Content-Length header?
>
> RFC 7578 says "The multipart/form-data media type does not support any
> MIME headerields in parts other than Content-Type, Content-Disposition, and
> (in limited circumstances) Content-Transfer-Encoding. Other header fields
> MUST NOT be included and MUST be ignored", however this does not mean
> that a client implementation can not add the Content-Length header.
>
> Knowing the size of an uploaded file without having to read the content
> again may be useful.
>
>
> Thanks
> Manlio
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to