Skip to content
This repository

Removing check for trailing slash #31

Closed
wants to merge 1 commit into from

2 participants

Robert Reinhard Joe Germuska
Robert Reinhard

I'm no Python dev, so probably going about this the wrong way. But I don't get why it matters if there is a trailing slash. So I commented that part out. I think most users would benefit from this.

Joe Germuska

At least for ApacheBench 2.3, a trailing slash is required, or else the message ab: invalid URL is returned.

If you can specify a version of AB where it isn't required, we could make this switchable behavior. But I don't think we simply want to remove that check completely, or if we do, we should find a way to clearly pass through the error when the bees don't work because of a missing trailing slash.

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

Showing 1 unique commit by 1 author.

Apr 12, 2012
Robert Reinhard weotch Disabling the restriction on ending with a / 331f37d
This page is out of date. Refresh to see the latest.
BIN  .DS_Store
Binary file not shown
5 beeswithmachineguns/main.py
@@ -113,8 +113,9 @@ def parse_options():
113 113 if not options.url:
114 114 parser.error('To run an attack you need to specify a url with -u')
115 115
116   - if NO_TRAILING_SLASH_REGEX.match(options.url):
117   - parser.error('It appears your URL lacks a trailing slash, this will disorient the bees. Please try again with a trailing slash.')
  116 + # Not sure why this is necessary, disabling
  117 + # if NO_TRAILING_SLASH_REGEX.match(options.url):
  118 + # parser.error('It appears your URL lacks a trailing slash, this will disorient the bees. Please try again with a trailing slash.')
118 119
119 120 bees.attack(options.url, options.number, options.concurrent)
120 121 elif command == 'down':

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.