URL encoding

296 views
Skip to first unread message

Zique Sousa

unread,
Jun 7, 2013, 2:24:37 PM6/7/13
to gat...@googlegroups.com
after running my script, I noticed that I am getting a 404 error message in my log.  I think it has to do with URL encoding.
The URL I am trying to use redirects me to a page that has a "#" in the URL like so https://server.com/userportal/#/mileage/period/current

in the debug log I noticed that its encoding the "#" and changing it to "23"

https://server.com/userportal/%23/mileage

Any ideas how I can resolve this issue?

Stéphane Landelle

unread,
Jun 7, 2013, 5:32:56 PM6/7/13
to gat...@googlegroups.com
Which version of Gatling do you use? Do you use follow redirect?
I would have expected the fragment (what comes after the #) to be ignored.


2013/6/7 Zique Sousa <zique1...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Zique Sousa

unread,
Jun 7, 2013, 10:09:24 PM6/7/13
to gat...@googlegroups.com
I am using gatling-charts-highcharts-1.5.0

Zique Sousa

unread,
Jun 7, 2013, 10:10:56 PM6/7/13
to gat...@googlegroups.com
As for your other question "Do you use follow redirect", I don't think I do. Actually, I am not sure. How do I check?


On Friday, June 7, 2013 5:32:56 PM UTC-4, Stéphane Landelle wrote:

Stéphane Landelle

unread,
Jun 8, 2013, 2:52:37 AM6/8/13
to gat...@googlegroups.com
I can't reproduce.
I checked that a Location header https://server.com/userportal/#/mileage/period/current is indeed redirected to /userportal and that the fragment is not being sent to the server.

Could you provide more details, please? How is the redirect being done in your application? HTTP redirect?


2013/6/8 Zique Sousa <zique1...@gmail.com>

Zique Sousa

unread,
Jun 10, 2013, 12:25:35 PM6/10/13
to gat...@googlegroups.com
yes, its HTTPredirect

Stéphane Landelle

unread,
Jun 10, 2013, 12:48:00 PM6/10/13
to gat...@googlegroups.com
And you say that your server returns a 30X with a Location header whose value is https://server.com/userportal/#/mileage/period/current, and that Gatling redirects to https://server.com/userportal/%23/mileage, right?


2013/6/10 Zique Sousa <zique1...@gmail.com>

Zique Sousa

unread,
Jun 10, 2013, 3:49:51 PM6/10/13
to gat...@googlegroups.com
correct

Stéphane Landelle

unread,
Jun 10, 2013, 4:19:05 PM6/10/13
to gat...@googlegroups.com
Then I really don't understand and can't reproduce.

I just built a test case and here's what I get:

Response:
HTTP/1.1 303 See Other
Content-Length: 0

Request:
GET /userportal/ HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
DNT: 1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0

As you can see, and as expected, Gatling doesn't send the fragment part.

Could you try a proxy tool such as Charles, please?

Proxy Settings to check/enable the proxy ports, then add .proxy("localhost"8888) to your httpConf in your Gatling simulation


2013/6/10 Zique Sousa <zique1...@gmail.com>
Message has been deleted

Julian

unread,
Nov 11, 2015, 1:24:10 AM11/11/15
to Gatling User Group
Hi Mr. Stephane,

After running my script, log returned several requested resources with 404 response status.
I am using Gatling 2.1.7 and enabled Follow Redirects. I think what is expected is that 3XX status should be returned when requests are redirected. 
I am confused over the 404 status while resources are actually accessible or "can be found". Can this be a problem in the connection, the redirection process, or the application itself?
Please help. 

Here's a segment of the returned log:

>>>>>>>>>>>>>>>>>>>>>>>>>>
Request:
request_165 Redirect 1: KO status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 404
=========================
Session:
Session(SCRIPT1PrimaryStudentWorkflow2,233938688883115974-0,Map(gatling.http.cache.redirects -> io.gatling.core.util.cache.Cache@9495df, gatling.http.cache.expireCache -> io.gatling.core.util.cache.Cache@132c77f, gatling.http.cache.lastModifiedCache -> io.gatling.core.util.cache.Cache@aefc85, gatlin
refghYA%2521YnhapuGvzr%257C1447063822%2521ErqverpgHey%257Cabbc%2521FRFFVQ%257C38w0u5z6aq09voab99g9rr8s24%2521GranagVq%257C1&registration=PynffVq%257C0%2521PbhefrVq%257C61500%2521VafgnaprVq%257C0%2521FpbezVq%257C8799%2521FhoqbznvaVq%257C6%2521HfreVq%257C747847, gatling.http.cache.etagCache -> io.gatl
ing.core.util.cache.Cache@917148, gatling.http.cookies -> CookieJar(Map(CookieKey(appsvrid,myserver.org,/) -> StoredCookie(APPSVRID=CLMS.App.54.10.122.96.214; path=/,true,false,1447213683652), CookieKey(jsessionid,myserver.org,/cas) -> StoredCookie(JSESSIONID=C5A899941E952372AFA3FF42
6463BFBF; path=/cas; HTTPOnly,true,false,1447213698930), CookieKey(sessa8892e87c00658dfb8c0c54e6e7bfc7f,cambridgelms.org,/) -> StoredCookie(SESSa8892e87c00658dfb8c0c54e6e7bfc7f=d25cidq2plvtor8d9e4opd9kc6; domain=.cambridgelms.org; path=/; HTTPOnly,false,false,1447213705811), CookieKey(org.springfram
ework.web.servlet.i18n.cookielocaleresolver.locale,myserver.org,/) -> StoredCookie(org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; path=/; HTTPOnly,true,false,1447214007768)))),1447213681924,24,KO,List(GroupBlock(List(ACTION 5: VIEW CONTENT),1447213945646,52214,63,0)),<f
unction1>)
=========================
HTTP request:
headers=
521YnhapuGvzr%257C1447063822%2521ErqverpgHey%257Cabbc%2521FRFFVQ%257C38w0u5z6aq09voab99g9rr8s24%2521GranagVq%257C1&registration=PynffVq%257C0%2521PbhefrVq%257C61500%2521VafgnaprVq%257C0%2521FpbezVq%257C8799%2521FhoqbznvaVq%257C6%2521HfreVq%257C747847
Cookie: APPSVRID=CLMS.App.54.10.122.96.214; SESSa8892e87c00658dfb8c0c54e6e7bfc7f=d25cidq2plvtor8d9e4opd9kc6; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en
Connection: keep-alive
Accept: */*
=========================
HTTP response:
status=
404 Not Found
headers=
Date: [Wed, 11 Nov 2015 03:53:47 GMT]
Server: [Apache]
Vary: [Accept-Encoding]
Content-Length: [299]
Connection: [close]
Content-Type: [text/html; charset=iso-8859-1]

body=
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /error/scorm_packs/kb_010107_j05_3_lea_1398670479_04_28_2014/resources/activities/kb_010107_j05_01.jpg was not found on this server.</p>
</body></html>

<<<<<<<<<<<<<<<<<<<<<<<<<


Stéphane LANDELLE

unread,
Nov 11, 2015, 7:25:52 AM11/11/15
to gat...@googlegroups.com
Hi Julian,

You have to realize that we cannot help you unless you provide a reproducer, ie a Gatling simulation that we can run so we can investigate. Any simulation sample that can't be run because you anonymized the urls is pretty useless.

If your application is private and you can't share, I'm afraid you're on your own. Then, you should probably get some help from your seniors.

We can help on private applications, but only our customers who purchased a support offer.

Regards,

Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages