mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Include the Content-Type boundary directive in form submissions
The spec requires that "multipart/form-data" Content-Type headers also include a boundary directive. This allows the content server to validate the submitted form data. Google Lens, for example, rejects forms missing this directive.
This commit is contained in:
parent
1cdccf901b
commit
b16b9709b9
Notes:
github-actions[bot]
2024-08-22 12:22:09 +00:00
Author: https://github.com/trflynn89
Commit: b16b9709b9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1158
Reviewed-by: https://github.com/shannonbooth
3 changed files with 27 additions and 6 deletions
|
@ -7,6 +7,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -26,6 +29,12 @@ struct POSTResource {
|
|||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#post-resource-request-content-type
|
||||
// A request content-type, which is `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain`.
|
||||
RequestContentType request_content_type {};
|
||||
|
||||
struct Directive {
|
||||
StringView type;
|
||||
String value;
|
||||
};
|
||||
Vector<Directive> request_content_type_directives {};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue