Skip to content
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

Request name not pertinent in case of redirection #174

Closed
florentbr opened this issue Jul 4, 2014 · 3 comments
Closed

Request name not pertinent in case of redirection #174

florentbr opened this issue Jul 4, 2014 · 3 comments

Comments

@florentbr
Copy link

In the statistics and failures pages, the name of the request is the last redirected Url path.
It seems pertinent, but in case of redirection, it's almost impossible to identify the original link of a name.
For example, the request to 'http://adf.ly/abcdef' gives the name '/link-deleted.php' with a 404 error in the failures page.
With this name only, it's impossible to identify the original Url that caused the error.
I think it would be more appropriate to use the original Url path as a name rather than the last redirected Url path.

Currently in client.py :
request_meta["name"] = name or response.request.path_url

Should be :
request_meta["name"] = name or (response.history and response.history[0] or response).request.path_url

@Jahaja
Copy link
Member

Jahaja commented Jul 12, 2014

You basically want to be able to see the redirect history?

@florentbr
Copy link
Author

I'm not interested by the history itself.
I just expect to have the name of the URL I provide in the locust script to be displayed in the stats.
It's currently not the case when a redirection occurs as it displays the final location, making it impossible to trace the name back to the script.

For example, this locust script :
self.client.get("http://adf.ly/abcdef.php")
will display this name in the stats:
"/link-deleted.php"
I'm expecting to have "/abcdef.php" as the redirected URL path is useless

I really don't see the point in displaying the redirected URL as a name in the stats.
I already made the change on my fork. I can make a pull request if you find it pertinent.

@heyman heyman closed this as completed in a912f5a Sep 6, 2014
@heyman
Copy link
Member

heyman commented Sep 6, 2014

I agree that's a better default behaviour. Thanks!

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

No branches or pull requests

3 participants