Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPrevent panic when calling `url::Url::set_host` with `None`. #244
Conversation
|
r? @SimonSapin |
|
Note this line from the URL spec:
So both set_host(None) and set_host("") should probably fail if SchemeType::from(self.scheme()).is_special() So while the test should not crash, the result should not be https:/hello |
|
@SimonSapin Do you remember why there is logic here for the 'cannot-be-a-base-URL' flag? At least for the link that @valenting sent, it doesn't look like that logic needs to be here. |
|
@bors-servo r+ |
|
|
Prevent panic when calling `url::Url::set_host` with `None`. Fixes #243. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/244) <!-- Reviewable:end -->
|
|
frewsxcv commentedDec 2, 2016
•
edited by larsbergstrom
Fixes #243.
This change is