Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Framework: Apache decoding encoded URL instead of passing encoded URL?
    primarykey
    data
    text
    <p>I am testing my Zend Framework application using Selenium and PHPUnit. I have a test that needs to open a URL that contains an encoded URL.</p> <pre><code>$redirectToLocation = urlencode('/myothercontroller/action'); // %2Fmyothercontroller%2Faction $this-&gt;openAndWait('/controller/action/thenRedirectTo/' . $redirectToLocation); </code></pre> <p>But when I run my test, the browser tried opening the decoded URL:</p> <pre><code>/controller/action/thenRedirectTo//myothercontroller/action </code></pre> <p>What should I do to get selenium to open the encoded URL?</p> <p><strong>Update:</strong> Actually...turns out selenium is doing it's job, but it seems as if Apache is decoding the URL before it gets to the controller:</p> <pre><code>The requested URL /controller/action/thenRedirectTo//myothercontroller/action was not found on this server. </code></pre> <p>How should I fix this problem?</p> <p><strong>Update:</strong> Here's a whole conversation about the same problem that I'm having: <a href="http://old.nabble.com/URL-Encoding-td18850769.html" rel="nofollow">http://old.nabble.com/URL-Encoding-td18850769.html</a>. Their workaround was to base64 encode the url, but that's not good enough for me. I may use this solution in the short term, but I want to know what is the real cause of this problem, so I can eliminate it.</p> <p><strong>Update:</strong> I have a co-worker who thinks there may be a problem with the way Zend Framework is routing the request. Do you think that could be the case? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload