Extra newline

merge-requests/30/head
Bob Mottram 2022-07-10 20:18:37 +01:00
parent 3dd4debf24
commit 4dc62cfb8e
2 changed files with 3 additions and 3 deletions

View File

@ -1497,7 +1497,7 @@ def extract_text_fields_in_post(post_bytes, boundary: str, debug: bool,
)
if debug:
print('DEBUG: POST message_fields: ' + str(message_fields))
lynx_content_type = 'Content-Type: text/plain; charset=utf-8'
lynx_content_type = 'Content-Type: text/plain; charset=utf-8\r\n'
# examine each section of the POST, separated by the boundary
for fld in message_fields:
if fld == '--':

View File

@ -5855,9 +5855,9 @@ def _test_extract_text_fields_from_post():
boundary = '--LYNX'
form_data = '--LYNX\r\nContent-Disposition: form-data; ' + \
'name="fieldName"\r\nContent-Type: text/plain; ' + \
'charset=utf-8\r\nThis is a lynx test\r\n--LYNX\r\n' + \
'charset=utf-8\r\n\r\nThis is a lynx test\r\n--LYNX\r\n' + \
'Content-Disposition: form-data; name="submitYes"\r\n' + \
'Content-Type: text/plain; charset=utf-8\r\nBUTTON\r\n--LYNX--\r\n'
'Content-Type: text/plain; charset=utf-8\r\n\r\nBUTTON\r\n--LYNX--\r\n'
debug = True
fields = extract_text_fields_in_post(None, boundary, debug, form_data)
print('fields: ' + str(fields))