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 8155343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:38:43+00:00 2026-06-06T16:38:43+00:00

I am talking to a server that used to send me HTTP strings like

  • 0

I am talking to a server that used to send me HTTP strings like this:

/path/to/my/handler/?action-query&id=112&type=vca&info=ch=0&type=event&ev16[sts=begin (...)

So the “info” GET parameter included “=” and “&” characters. It was rather unorthodox but nevertheless we wrote a parser for it. However, recently they have decided to encode part of it, so now the string looks like this..

/path/to/my/handler/?action=query&id=112&type=vca&info=ch%3D0%26type%3Devent%26ev46[sts%3Dbegin (...)

This breaks our parser, which expects a string like the first one.

Can I somehow “de-encode” the string, so that I can use the old code (so that it’s not broken as we re-write the parser)?

As per answer below, we can use urllib.unquote() to clean the string up. However, we are relying on request.GET, which gets set up based on the first string. Is it possible to reconstruct the GET object based on the new converted string, or somehow force it to re-evaluate?

  • 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-06-06T16:38:45+00:00Added an answer on June 6, 2026 at 4:38 pm

    I suspect what you want is the unquote function from the urllib module.

    >>> s = '/path/to/my/handler/?action=query&id=112&type=vca&info=ch%3D0%26type%3Devent%26ev46[sts%3Dbegin'
    >>> import urllib
    >>> urllib.unquote(s)
    '/path/to/my/handler/?action=query&id=112&type=vca&info=ch=0&type=event&ev46[sts=begin'
    

    Edit: I’m not very familiar with Django, but the Request and response object section of their docs states the following:

    QueryDict instances are immutable, unless you create a copy() of them. That means you can’t change attributes of request.POST and request.GET directly.

    Based on my limited reading of those docs, you might be able to apply the unquote() function to the HttpRequest.body attribute and build a new QueryDict out of the results (and possibly use it to update your current one if necessary).

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

Sidebar

Related Questions

I have a query that's used in a reporting system of ours that sometimes
I'm talking to a DDE server I don't have very much documentation for using
Edit: When I say SQL Server, I'm really talking about the Management Studio. Sorry
I have a program (written in C/C++) that behaves as a socket server. I'd
When SQL Server Books online says that "Shared (S) locks on a resource are
We have an app that creates queues and services in SQL Server using the
An application that I've built is used worldwide by our organization and needs to
I must have read a hundred forum and blogposts about this, all talking about
I'm creating a wrapper for a Minecraft Server that is supposed to take new
I am designing a server in java which would be used to trade bonds.

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.