CVSTrac Legacy Code

Check-in [4b004e65d5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:(#766) handle missing f parameter
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4b004e65d5e48a3f2e2b5ae3464b094d464ce3fb
User & Date: cpb 2008-10-29 18:45:28
Context
2008-11-14
15:33
(#768) printf argument needs escaping, and it's the wrong one anyways check-in: d04d9de48b user: cpb tags: trunk
2008-10-29
18:45
(#766) handle missing f parameter check-in: 4b004e65d5 user: cpb tags: trunk
2008-10-23
16:24
we need to armour the cookie value. Otherwise, it can contain values which aren't legal in a CGI parameter name. check-in: 89bfff7fd9 user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to browse.c.

782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
...
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
/*
** WEBPAGE: /fileview
**
** Show the file in a HTML page. In the case of things like images, show the
** content embedded in the page.
*/
void browse_fileview(void){
  const char *zFile = g.zExtra ? g.zExtra : P("f");
  const char *zVers = PD("v","");
  char *zGetFile;
  char *zDir, *z;
  char *zSuffix;
  char *zMime = "text/plain";  /* The default MIME type */

  /* The following table lists some alternative MIME types based on
................................................................................

/*
** WEBPAGE: /getfile
**
** Return the complete content of a file
*/
void browse_getfile(void){
  const char *zFile = g.zExtra ? g.zExtra : P("f");
  const char *zVers = P("v");
  char *zSuffix;
  const char *zName;
  char *zMime = "text/plain";  /* The default MIME type */

  /* The following table lists some alternative MIME types based on
  ** the file suffix







|







 







|







782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
...
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
/*
** WEBPAGE: /fileview
**
** Show the file in a HTML page. In the case of things like images, show the
** content embedded in the page.
*/
void browse_fileview(void){
  const char *zFile = g.zExtra ? g.zExtra : PD("f","");
  const char *zVers = PD("v","");
  char *zGetFile;
  char *zDir, *z;
  char *zSuffix;
  char *zMime = "text/plain";  /* The default MIME type */

  /* The following table lists some alternative MIME types based on
................................................................................

/*
** WEBPAGE: /getfile
**
** Return the complete content of a file
*/
void browse_getfile(void){
  const char *zFile = g.zExtra ? g.zExtra : PD("f","");
  const char *zVers = P("v");
  char *zSuffix;
  const char *zName;
  char *zMime = "text/plain";  /* The default MIME type */

  /* The following table lists some alternative MIME types based on
  ** the file suffix