liquid_feedback_frontend
diff fastpath/getpic.c @ 52:88ac7798b562
Several bugfixes (getpic.c, accepted but canceled issues, ...); Listing of available policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
| author | bsw/jbe |
|---|---|
| date | Thu Apr 15 19:58:25 2010 +0200 (2010-04-15) |
| parents | afd9f769c7ae |
| children | 0f29051a49f6 |
line diff
1.1 --- a/fastpath/getpic.c Sun Apr 04 22:05:11 2010 +0200 1.2 +++ b/fastpath/getpic.c Thu Apr 15 19:58:25 2010 +0200 1.3 @@ -20,14 +20,14 @@ 1.4 char *args_string; 1.5 char *member_id; 1.6 char *image_type; 1.7 - char *sql_member_image_params[2]; 1.8 + const char *sql_member_image_params[2]; 1.9 1.10 char *cookies; 1.11 regex_t session_ident_regex; 1.12 ssize_t start, length; 1.13 regmatch_t session_ident_regmatch[3]; 1.14 char *session_ident; 1.15 - char *sql_session_params[1]; 1.16 + const char *sql_session_params[1]; 1.17 1.18 PGconn *conn; 1.19 PGresult *dbr; 1.20 @@ -48,7 +48,7 @@ 1.21 // shouldn't happen 1.22 abort(); 1.23 } 1.24 - if (regexec(&session_ident_regex, cookies, 2, session_ident_regmatch, 0) != 0) { 1.25 + if (regexec(&session_ident_regex, cookies, 3, session_ident_regmatch, 0) != 0) { 1.26 fputs("Status: 403 Access Denied\n\n", stdout); 1.27 return 0; 1.28 } 1.29 @@ -125,10 +125,7 @@ 1.30 PQfinish(conn); 1.31 return 1; 1.32 } 1.33 - fputs("Content-Type: ", stdout); 1.34 - fprintf(stdout, "Content-Length: %i\n", PQgetlength(dbr, 0, 1)); 1.35 - fwrite(PQgetvalue(dbr, 0, 0), PQgetlength(dbr, 0, 0), 1, stdout); 1.36 - fputs("\n\n", stdout); 1.37 + fprintf(stdout, "Content-Type: %s\n\n", PQgetvalue(dbr, 0, 0)); 1.38 fwrite(PQgetvalue(dbr, 0, 1), PQgetlength(dbr, 0, 1), 1, stdout); 1.39 } 1.40 PQfinish(conn);