Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorsuthern
    • CommentTimeMar 4th 2008 edited
     

    I've found what may be a bug (heh), and a work around (that looks ugly in the URI).

    When I try to pass something like 'Computer & Office Equiptment' in the URL (like this /part/edit_accounts/Inventory/asset/Computer+%26+Office+Equipment/), Akelos splits it up into two params, like this

    [controller] => part
    [action] => edit_accounts
    [ak] => part/edit_accounts/Inventory/asset/Computer 
    [Office_Equipment/] => 
    [AK_023957] => d3be5eba4048afb75ba4100435cd03f8
    [lang] => en
    [category] => Inventory
    [account_type] => asset
    [account_name] => Computer 
    

    I've found a way around it by calling urlencode TWICE, making the URL look like this:

    /part/edit_accounts/Inventory/asset/Computer%2B%2526%2BOffice%2BEquipment/
    

    I now get the right params, but it looks downright ugly. Is this a bug? Perhaps a 'undocumented feature'? ;-) I can live with it the way it is, but thought perhaps someone else would enjoy a heads up about passing symbols like "/" and "&" through the URL.

    •  
      CommentAuthorriffed
    • CommentTimeMar 4th 2008
     

    Probaly best to write a helper to encode the address. I'm guessing not a bug but not a feature either.

    • CommentAuthorsuthern
    • CommentTimeMar 4th 2008 edited
     

    Indeed. I've modified my helper so it encodes it twice. Not hard, just had me scratching my head for a few mins. Carry on!

    • CommentAuthorKaste
    • CommentTimeMar 6th 2008
     

    Can it be that %26 = & gets eaten before akelos handles the request? apache? .htaccess?

    • CommentAuthorsuthern
    • CommentTimeMar 7th 2008
     

    Not only %26, but &#47 = '/' too. I don't know where it vanishes, 'double encoding' works for now.

    • CommentAuthorKaste
    • CommentTimeMar 7th 2008
     

    yes, but a slash is a slash and will always be interpreted as limiter by the Router. The & comes into play after an ?, to chain so to speak. I'm sure the Router is an ampersand-ignoramus.

    • CommentAuthorsuthern
    • CommentTimeMar 19th 2008
     

    Ok, now that I've upgraded to the latest revision (508), double encoding no longer works. A slash is once again interpreted as a limiter by the Router.

    Other than using a SESSION variable, how could I 'keep' the variable (with the slash in it) between page refreshes?

    •  
      CommentAuthorbermi
    • CommentTimeMar 19th 2008
     

    suthern, on revision 509, I have fixed the URL encoding bug. Thanks for reporting.

    • CommentAuthorsuthern
    • CommentTimeMar 21st 2008
     
    Thanks Bermi! I should have put a bug report in for it. I've switched to using the id of a record rather than the name, so slashes are not an issue. The real bug is in QuickBooks. It should not allow slashes in it's names. heh.
Add your comments
    Username Password
  • Format comments as