No header deletion for forms with files

Fixes #453
fix enpoint bug
Fixed the wrong endpoint value check when no endpoint is set in config.
collection parameter.