-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Empty Input Cannot Be Processed #73
Labels
Comments
sideshowbarker
added a commit
that referenced
this issue
Dec 27, 2017
This change improves handling for empty input in the Web UI — for all input cases (URI, file-upload, textarea/direct-input). It adds client-side form validation to the Web UI, so that users get error messages in the Web UI itself and won’t be able to submit empty input to the server to begin with. And if a user manages to bypass the client-side validation and submits empty input to the server, the server redirects the request back in such a way that the same error messages are shown to the user in the Web UI. So users see the same error messages in the Web UI regardless of whether the empty-input problem was caught on the server side, or else on the client side before being submitted to the server. Fixes #73 Thanks @niedzielski
sideshowbarker
added a commit
that referenced
this issue
Dec 27, 2017
This change improves handling for empty input in the Web UI — for all input cases (URI, file-upload, textarea/direct-input). It adds client-side form validation to the Web UI, so that users get error messages in the Web UI itself and won’t be able to submit empty input to the server to begin with. And if a user manages to bypass the client-side validation and submits empty input to the server, the server redirects the request back in such a way that the same error messages are shown to the user in the Web UI. So users see the same error messages in the Web UI regardless of whether the empty-input problem was caught on the server side, or else on the client side before being submitted to the server. Relates to #73
What response would you want to have instead for the case where the input is empty? |
Success is expected since no CSS is valid CSS. This configuration won't require tools that process multitudes of files to filter out empty inputs. |
sideshowbarker
added a commit
that referenced
this issue
Dec 28, 2017
This change makes the server (servlet) allow empty file-upload input and empty text/direct-input from POST requests — including from requests made with the HTTP POST API — and to respond with a success message. That more closely aligns the POST handling with the existing GET handling; e.g., http://localhost:8080/css-validator/validator?text=, which allows the `text` query parameter to be empty, and treats such content as conforming (because empty CSS documents are valid). Fixes #73. Thanks @niedzielski
sideshowbarker
added a commit
that referenced
this issue
Dec 28, 2017
This change makes the server (servlet) allow empty file-upload input and empty text/direct-input from POST requests — including from requests made with the HTTP POST API — and to respond with a success message. That more closely aligns the POST handling with the existing GET handling; e.g., https://jigsaw.w3.org/css-validator/validator?text=, which allows the `text` query parameter to be empty, and treats such content as conforming (because empty CSS documents are valid). Fixes #73. Thanks @niedzielski
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The validator is unable to process empty input files and produces the following error both on direct input and empty file input:
The text was updated successfully, but these errors were encountered: