# Incorrect handling of empty form fields.

**URL:** <https://forums.digi.com/t/incorrect-handling-of-empty-form-fields/4255>\
**Category:** Plug N' Play\
**Tags:** http\
**Created:** [August 23, 2010, 4:09pm UTC](https://forums.digi.com/t/incorrect-handling-of-empty-form-fields/4255 "2010-08-23T16:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleppin](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@aleppin](https://forums.digi.com/u/aleppin)\
**Post date:** [August 23, 2010, 4:09pm UTC](https://forums.digi.com/t/incorrect-handling-of-empty-form-fields/4255/1 "2010-08-23T16:09:42Z")

</div>

Summary: Incorrect handling of empty form fields when using Enctype=MULTIPART/FORM-DATA.

If contents of a form item are null, the rpHTTPD returns 400 error. For example:

```auto

-----------------------------14162188131998
Content-Disposition: form-data; name="szMailRecv4"
&lt;-- empty field
-----------------------------14162188131998
Content-Disposition: form-data; name="control_type"
Apply
-----------------------------14162188131998--
--&gt;
HTTP/1.1 400 Bad Request
Content-Length: 0
Server: ---

```

There is a workaround to avoid this bug:

```auto

-----------------------------47452064913186
Content-Disposition: form-data; name="szMailRecv2"
test2@mail.ru
-----------------------------47452064913186
Content-Disposition: form-data; name="szMailRecv3"
 &lt;-- Note the space.
-----------------------------47452064913186
Content-Disposition: form-data; name="control_type"
Apply
-----------------------------47452064913186--
--&gt;
HTTP/1.1 303 See Other
Location: http://192.168.1.29/---.htm
Content-Length: 0
Server: ---

```

Now it works normally, but it requires an additional processing by both JS and application code.
