Development

#1852 ([PATCH] genUrl bug with GET mode and redirection)

You must first sign up to be able to contribute.

Ticket #1852 (new defect)

Opened 1 year ago

Last modified 4 months ago

[PATCH] genUrl bug with GET mode and redirection

Reported by: Eric.Lemoine Assigned to: fabien
Priority: major Milestone:
Component: controller Version: 1.0.0
Keywords: genUrl sfWebController Cc:
Qualification: Design decision

Description

Hi

I tested my application with sf_url_format different from 'PATH' so the function genUrl in controller/sfWebController.class.php generates url in 'standard' format. But I have arg_separator.output set to &. So when I use the redirect() function, it separates my arguments with & instead of simply &.

I've made a patch for this bug.

My patch also corrects another bug due to a wrong usage of the strtr() PHP function.

Hope to see my patch be integrated in trunk :)

Attachments

sfWebController.class.php.patch (0.7 kB) - added by Eric.Lemoine on 06/14/07 11:36:01.

Change History

06/14/07 11:36:01 changed by Eric.Lemoine

  • attachment sfWebController.class.php.patch added.

10/01/07 07:59:05 changed by dwhittle

  • qualification set to Patch rejected, quality issue.

Your patch limits the equals and divider, these should be flexible.

03/06/08 12:34:34 changed by Eric.Delord

A better way is to patch redirect method in sfAction

abstract class sfAction extends sfComponent { ...

public function redirect($url, $statusCode = 302) {

ini_set('arg_separator.output','&'); ....

}

} we change the arg_separator output just for the redirect method so that genUrl compute an url with & instead of &

03/16/08 08:25:39 changed by hirose

For the same reason, sfWebController::genUrl('group/index') gets result "grou".

Because in sfRouting::generate(), calling rtrim($real_url, $divider) but $divider is "&". This means to trim 'a', 'm', 'p' or ';' addition to '&'.

03/20/08 14:48:47 changed by hirose

I think the separator should be "&" not "&". Why does symfony override arg_separator.output setting to "&" by default?

06/23/08 06:09:43 changed by dwhittle

  • qualification changed from Patch rejected, quality issue to Design decision.
  • milestone set to 1.1.0 FINAL.

06/23/08 17:38:55 changed by fabien

  • milestone deleted.