Skip to content

Conversation

@mharen
Copy link
Contributor

@mharen mharen commented Feb 27, 2023

Summary

Updates Url Payload Generator to better handle when a given url includes HTTP/HTTPS.

This PR fixes/implements the following bugs/features:

  • Bug: URL Payload Generator incorrectly prefixes http:// to inputs that already include HTTP://

Test plan

  • unit test added to verify correct behavior
  • make sure solution builds and tests run sucessfully

@Shane32
Copy link
Owner

Shane32 commented Apr 6, 2024

The changes here do not fail any tests. I suggest merging the PR.

@codebude codebude merged commit a24c984 into Shane32:master Apr 17, 2024
@mharen
Copy link
Contributor Author

mharen commented Apr 17, 2024

Thanks!

@codebude
Copy link
Collaborator

Hi @mharen , hi @Shane32 ,

thanks for your help. The change fixes the problem, thus I merged it. :-)
In future I propably will replace it by a Regex, because I think the startswith solution is somehow weak. Think about an input like "http-service.com". It would be matched by the startswith and the generator wouldn't prefix it, even if the protocol is missing.
With an Regex we may avoid it: https://regex101.com/r/PbTCnq/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants