{"thread":{"id":"29618","subject":"GitWeb and atom feed links","startedAt":"2012-02-13T20:43:33Z","lastAt":"2012-02-13T22:17:34Z","messageCount":2,"participants":["Heiko W. Rupp","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"184605","messageId":"F3741779-8DDA-4275-BB68-24D02297C702@pilhuhn.de","threadId":"29618","inReplyTo":null,"subject":"GitWeb and atom feed links","fromName":"Heiko W. Rupp","fromEmail":"hwr@pilhuhn.de","sentAt":"2012-02-13T20:43:33Z","receivedAt":"2012-02-13T20:43:33Z","isPatch":false,"sender":{"key":"hwr@pilhuhn.de","avatar":null},"body":"Hi,\n\n( got this email from Junio )\n\nwhen you e.g. look at http://git.kernel.org/?p=git/git.git;a=summary and then the lower right, there\nare two buttons for feeds. If you click on e.g. atom, you end up with an url of http://git.kernel.org/?p=git/git.git;a=atom\nwhere the output is not a feed in atom format, but plain html with tables etc.\n\nIf you change the url to http://git.kernel.org/?p=git/git.git&a=atom\n\nthe output is a correct atom feed (same for rss).\n\nI've traced it down in my copy of gitweb to \n\nsub git_footer_html {\n...\n                     $href_params{'action'} = lc($format);\n                      print $cgi->a({-href => href(%href_params),\n                                    -title => \"$href_params{'-title'} $format feed\",\n                                    -class => $feed_class}, $format).\"\\n\";\n\nand here to the usage of href()\n\nLocally I've modified that to \n\n                     $href_params{'action'} = lc($format);\n                      my $hr = \"?p=$project&a=\"; \n                      $hr .= lc($format);\n                      print $cgi->a({-href => $hr,\n                                    -title => \"$href_params{'-title'} $format feed\",\n                                    -class => $feed_class}, $format).\"\\n\";\n\nand it works.\n\nAttached is a patch against current master that reflects above change\n\n   Heiko\n\n-- \nHeiko Rupp   hwr@pilhuhn.de\nBlog: http://javablogs.com/ViewBlog.action?id=14468\n"},{"id":"184614","messageId":"201202132317.35255.jnareb@gmail.com","threadId":"29618","inReplyTo":"F3741779-8DDA-4275-BB68-24D02297C702@pilhuhn.de","subject":"Re: GitWeb and atom feed links","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2012-02-13T22:17:34Z","receivedAt":"2012-02-13T22:17:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Heiko W. Rupp wrote:\n> \n> when you e.g. look at http://git.kernel.org/?p=git/git.git;a=summary\n> and then the lower right, there are two buttons for feeds.\n\nYes, [Atom] and [RSS], for different formats of the same feed.\n\n> If you click on e.g. atom, you end up with an url of\n> http://git.kernel.org/?p=git/git.git;a=atom  \n> where the output is not a feed in atom format, but plain html with\n> tables etc. \n> \n> If you change the url to http://git.kernel.org/?p=git/git.git&a=atom\n> the output is a correct atom feed (same for rss).\n\nI don't know what is the source of bug you are seeing; I suspect some\ntrouble with output caching that git.kernel.org fork of gitweb has added,\nbut this isn't it.  Those two forms of 'atom' URL are equivalent.\n\nWikipedia says in  http://en.wikipedia.org/wiki/Query_string:\n\n \"* The query string is composed of a series of field-value pairs.\n  * The field-value pairs are each separated by an equals sign. The\n    equals sign may be omitted if the value is an empty string.\n  * The series of pairs is separated by the ampersand, '&' or\n    semicolon, ';'.\n\n  [...]\n\n  W3C recommends that all web servers support semicolon separators\n  in the place of ampersand separators.[4]\"\n\n[4]: http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2\n\n \"B.2.2 Ampersands in URI attribute values\n  ----------------------------------------\n\n  The URI that is constructed when a form is submitted may be used as an\n  anchor-style link (e.g., the href attribute for the A element).\n  Unfortunately, the use of the \"&\" character to separate form fields\n  interacts with its use in SGML attribute values to delimit character\n  entity references. For example, to use the URI \"http://host/?x=1&y=2\"\n  as a linking URI, it must be written <A href=\"http://host/?x=1&#38;y=2\">\n  or <A href=\"http://host/?x=1&amp;y=2\">.\n\n  We recommend that HTTP server implementors, and in particular, CGI\n  implementors support the use of \";\" in place of \"&\" to save authors\n  the trouble of escaping \"&\" characters in this manner.\"\n\nCGI(3pm) says:\n\n \"-newstyle_urls\n\n      Separate the name=value pairs in CGI parameter query strings with semi-\n      colons rather than ampersands.  For example:\n\n          ?name=fred;age=24;favorite_color=3\n\n      Semicolon-delimited query strings are always accepted, and will be\n      emitted by self_url() and query_string(). newstyle_urls became the\n      default in version 2.64.\"\n\n-- \nJakub Narebski\nPoland\n"}]}