Skip to content

Request URI and URL should NOT be rawurldecoded #632

@kohamkohane

Description

@kohamkohane

Request->uri()
and
Request->url()
should return original (not decoded) URL like in $_SERVER['REQUEST_URI']

URL should always be correct (rawurlencoded).

When i pass to Kohana:
http://example.com/welcome/index/one%20two
then $this->request->url(TRUE) returns decoded URL:
http://example.com/welcome/index/one two (with space between 'one' and 'two').

I think only Route parameters (directory, controller and action too) should be rawurldecoded, not entire URL.

Its important when I reuse current request URL, for example:

$this->request->redirect($this->request->uri());
<a href="<?php echo Request::current()->url(); ?>">Link</a>

It should be done for initial, internal and external request, and it is related to #630.

Summarizing:

  1. Request URL and URI should NOT be rawurldecoded for all kind of requests (initial, internal and external request).
  2. Route parameters should be always rawurldecoded for all kind of requests (initial, internal and external request). See rawurldecode request params #630.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions