costum error log

26 views
Skip to first unread message

BlueShadow

unread,
Apr 19, 2013, 2:22:21 PM4/19/13
to web...@googlegroups.com
Hi I got a custum error page which saves some of the data to give me a quick overview of the why those errors happen. it stores the error code the request.url and the useragent. my problem is I get a bunch of 400 errors. and I want to know what the users/bots typed in exactly. request_uri gives theurl of the error page request.url the URL they typed but stops at the function.
so if I type www.exampe.com/controller/function"#" I get a 400 error but how can I get those 3 characters in my error log.

Niphlod

unread,
Apr 19, 2013, 2:50:09 PM4/19/13
to web...@googlegroups.com
uhm.... you can't (even in a normal request) have the value that is assigned with an #anchor (call it anchor, fragment, whatever) ... that doesn't get passed to the webserver....so you can't have a page that fails because of that #part

Kevin Bethke

unread,
Apr 19, 2013, 2:53:52 PM4/19/13
to web...@googlegroups.com

Thats no anchor thats the first random character i found. Try it it fails. Code 400

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/qfl8qCtZJe8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Niphlod

unread,
Apr 19, 2013, 3:06:43 PM4/19/13
to web...@googlegroups.com
given that you want a ready-to-use solution, can you give an example ?
with /app/controller/function"#" you can't get what follows #, but the first " is in requested_uri as it should be.

BlueShadow

unread,
Apr 19, 2013, 4:36:27 PM4/19/13
to
well that was my personal trial to get a 400 error. I just want to find out why there are about 5-10 400 errors on my webpage per day. and if they are caused by some bad bots or something. So I can lock them out with my firewall.
If its just typos I won't do a thing. Right now I'm saving the request_url and the error code. But this wont help me at all if someone gets a 400 error on a working page.
Thats why I asked.
other things which cause 400 errors are .../function(testerror)
pretty much every non letter other than ? and /

Niphlod

unread,
Apr 20, 2013, 8:24:43 AM4/20/13
to web...@googlegroups.com
seems to me that what you want is save requested_uri .... no ?


On Friday, April 19, 2013 10:36:05 PM UTC+2, BlueShadow wrote:
well that was my personal trial to get a 400 error. I just want to find out why there are about 5-10 400 errors on my webpage per day. and if they are caused by some bad bots or something. So I can lock them out with my firewall.
If its just typos I won't do a thing. Right now I'm saving the request_url and the error code. But this wont help me at all if someone gets a 400 error on a working page.
Thats why I asked.
other things which cause 400 errors are .../function(testerror)
pretty much every non letter other than ? and /

On Friday, April 19, 2013 9:06:43 PM UTC+2, Niphlod wrote:
Reply all
Reply to author
Forward
0 new messages