jmcarp / jmcarp/robobrowser

Submit method="GET" must ignore query string

Open
#70 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.7k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

In a HTML form GET submit, the URL must ignore query string.

```html


Submit

```

```python
browser = RoboBrowser(parser="lxml")
browser.open("http://localhost:8000/")

form = browser.get_form("form")
form["field"] = "value"
browser.submit_form(form)
# browser.url == "http://localhost:8000/?field=value"

form = browser.get_form("form")
form["field"] = "other"
browser.submit_form(form)
# browser.url == "http://localhost:8000/?field=value&field=other"
```

The url must be `http://localhost:8000/?field=other`, removing previous query string.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two browser.submit_form(form) calls from the issue and trace how GET form submission builds the URL. Verify that a second submission replaces the existing query string rather than appending to it, with the final URL matching the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.