Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6540967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:02:44+00:00 2026-05-25T11:02:44+00:00

I am trying to get requests to pass on encoded strings in a URL.

  • 0

I am trying to get requests to pass on encoded strings in a URL. For example:

/application/controller/function/hello%20world

so that in my function I can access request.args and get a string that I can unquote().

I tried modifying rewrite.py to not convert %20 but that caused some error. Something else is catching these requests somewhere that I am having trouble finding. I noticed the httpserver.log file has:

127.0.0.1, 2011-09-02 00:12:09, GET, /application/controller/function/hello world, HTTP/1.1, 200, 0.169954

with the space already converted. Maybe that gives a hint. Where are the url’s getting unencoded?

Below are the contents of my routes file:

#!/usr/bin/python
# -*- coding: utf-8 -*-

default_application = 'chips'
default_controller = 'default'
default_function = 'index'


routes_onerror = [
   (r'*/404', r'/chips/static/404.html')
   ,(r'*/*',  r'/chips/static/error.html')
]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:02:45+00:00Added an answer on May 25, 2026 at 11:02 am

    By default, web2py will not allow special characters in args except ‘@’, ‘-‘, ‘=’, and ‘.’. To override that behavior, you can add the following to routes.py:

    routes_apps_raw=['chips']
    

    In that case, request.args will be set to None, and instead you can access the raw args from the URL via request.raw_args. Note, though, that routes_apps_raw does not work if you are using the parameter-based rewrite system (i.e., if your routes.py file includes a routers dictionary).

    Note, even with the above change, the Rocket web server included with web2py will still automatically unquote() the URL, so you’ll get the special characters in request.raw_args, but they will already be decoded.

    If you are instead using the parameter-based rewrite system, you can control which characters are allowed in URL args via the args_match key, which takes a regular expression as its value. The default regex is r'([\w@ -]|(?<=[\w@ -])[.=])*$', which allows ‘@’, ‘-‘, ‘=’, and ‘.’ (with some restrictions on ‘=’ and ‘.’).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to pass value by using EL expression in get request parameter, but
I am creating a chat using Ajax requests and I'm trying to get messages
I'm trying to URL encode a string to form a GET request from objective-c.
I am trying to add filter functionality that sends a GET request to the
Trying to get an ASP application deployed; it worked for a while but then
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
Simply stated: I'm trying to record audio in a browser, and get that data
I'm trying to pass an encrypted query string to another URL. The following code
I'm trying to pass in a Base64 string into a C#.Net web application via
I am trying to pass credentials to a website so I can use file_get_contents

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.