Commit Graph

106 Commits

Author SHA1 Message Date
Nicholas Guriev
a7c89b0e3f
Do not reopen stdout while image resizing
On Linux, some web-servers (Apache in particular) close file with fd = 1 and
offer something else as stdout. Notable difference can be seen with a pipe and
an immediate redirection. Consider:

  $ REQUEST_URI=/avatar/68b329da9893e34099c7d8ad5cb9c940 libravatarserv | cat > /tmp/response1.out
  $ REQUEST_URI=/avatar/68b329da9893e34099c7d8ad5cb9c940 libravatarserv > /tmp/response2.out
  $ diff -s /tmp/response{1,2}.out
  Binary files /tmp/response1.out and /tmp/response2.out differ

Solution.

The output should be identical in both cases. So do not let ImageMagick to open
/dev/stdout by itself, instead write the resulted image to an in-memory buffer
and then to a file associated with the "cout" global object.
2020-10-23 21:13:47 +03:00
de7e61a2fe
Update copyright years.
All checks were successful
the build was successful
2019-02-28 19:49:46 +01:00
139e5b24be
Bumped version to 0.7.3.
All checks were successful
the build was successful
2019-02-28 19:23:45 +01:00
1a4ebaf024
Fixed the bug introduced by latest bugfix. m(
All checks were successful
the build was successful
We included ?/& in the search, but forgot to set the pos +1 char to
the right.
2019-02-28 19:05:27 +01:00
79ed6d6432
Updated list of supported/unsupported fallbacks. 2019-02-28 18:57:13 +01:00
3f32e4ff51
Bugfix: "forcedefault" would be treated as "default".
All checks were successful
the build was successful
2019-02-28 18:54:50 +01:00
00a29894e9
Fixed background color for identicons.
All checks were successful
the build was successful
It was 2 characters too short. That resulted in an error.
2019-02-28 18:24:52 +01:00
97099f0a8a
retro and identicon is now 5x5.
All checks were successful
the build was successful
ivatar changed the size of retro to 5x5, mirroring that.
2019-02-28 17:53:52 +01:00
fba5c64486
Adjust identicons to match ivatar (10x10, padding, colors, retro = identicon).
All checks were successful
the build was successful
2019-02-20 23:12:48 +01:00
abe643bb6c
Updated Readme. 2019-02-20 03:22:57 +01:00
1475bdd3fc
Added extra warnings in debug builds. 2019-02-20 03:05:25 +01:00
021e9cfc1d
Initialize variables in Request and Image. 2019-02-20 03:04:23 +01:00
ee6a113e1a
Re-use Image object for identicons. 2019-02-20 03:03:09 +01:00
19896e78e0
Updated the dependency-list to require identiconpp-0.3.4 or above. 2018-12-28 02:25:34 +01:00
e43e3681e9
Updated the dependency-list to require identiconpp-0.3.3 or above.
All checks were successful
the build was successful
2018-12-27 22:55:53 +01:00
2491cb47e0
Updated the dependency-list to require identiconpp-0-3-2 or above.
All checks were successful
the build was successful
2018-12-27 22:13:10 +01:00
5b618eaf55
CI: Use identiconpp-0.3.1
All checks were successful
the build was successful
2018-12-27 19:44:13 +01:00
7e41468176
Set identicons to png
All checks were successful
the build was successful
2018-12-27 06:55:16 +01:00
68ac890eab
Switched identicon algorithm to sigil.
All checks were successful
the build was successful
2018-12-27 00:18:24 +01:00
ec8cd3aa10
Added identiconpp-dependency to drone file.
All checks were successful
the build was successful
2018-12-26 19:19:30 +01:00
a909b0405c
Deleted old identicon code. 2018-12-26 05:55:18 +01:00
41299b9529
Transformed some errors into warnings. 2018-12-26 05:47:06 +01:00
1dd89882b1
Switched to identiconpp for identicon-generation. 2018-12-26 05:45:31 +01:00
519f1e8fd6
Added -fno-omit-frame-pointer to debug builds 2018-12-19 15:01:44 +01:00
5475a60495
Removed cache-mention, because the header is not set anymore.
All checks were successful
the build was successful
2018-12-10 21:12:15 +01:00
ca0650a4cd
Fixed enginx example
All checks were successful
the build was successful
2018-12-09 20:04:48 +01:00
d2d35d8ac5
If requested size is < 0, return 80px image.
All checks were successful
the build was successful
2018-12-09 19:54:38 +01:00
f7d6bdc3e9
Moved Cache-Control header from program to nginx config. 2018-12-09 19:50:05 +01:00
9aa8803029
Return 501 or redirect if "Mystery Person" is not found.
All checks were successful
the build was successful
2018-12-06 22:03:59 +01:00
18b0ed6359
Link to "Mystery Person" SVG. 2018-12-06 22:03:05 +01:00
b00dce398e
Removed header: "Connection: close"
All checks were successful
the build was successful
I'm not sure what my motivation was to put it in there. It has no
place in a CGI program.
2018-12-03 22:07:51 +01:00
5205395f7f
Typo
All checks were successful
the build was successful
2018-12-03 21:40:18 +01:00
3666be0872
Added "public" to Cache-Control header.
All checks were successful
the build was successful
"max-age" already indicates that it can be cached, but it can't hurt
to allow it explicitly.
2018-12-03 21:27:26 +01:00
d065ed3bd2
Added section "Speed" to readme.
All checks were successful
the build was successful
2018-12-03 21:17:13 +01:00
e15289097a
Reformat readme
All checks were successful
the build was successful
2018-12-02 11:24:18 +01:00
3bdcd7b120
Include only necessary Magick++-headers.
All checks were successful
the build was successful
2018-12-01 11:33:32 +01:00
785cd7a35f
Refactored settings-stuff into own file.
All checks were successful
the build was successful
2018-11-30 07:00:37 +01:00
06a1bfccd9
Exit with error code 1 if request is bad 2018-11-30 06:54:56 +01:00
1aca78df88
Check if hash is valid 2018-11-30 06:48:45 +01:00
513391f44b
Replaced "\n\n" with << endl << endl for consistency
All checks were successful
the build was successful
2018-11-29 13:45:46 +01:00
268ff7ab6f
If size=0, return standard size(80px) 2018-11-29 13:43:56 +01:00
ec140aad01
Bugfix: detect file type and send appropriate Content-Type. 2018-11-29 13:40:50 +01:00
b3593a95f0
Clarified readme.
All checks were successful
the build was successful
2018-11-29 13:18:16 +01:00
b1347fc0f1
Made it clearer that the default image overrides fallbacks.
All checks were successful
the build was successful
2018-11-29 13:09:42 +01:00
60517a5f32
Add paragraph about identicons to "Things to keep in mind".
All checks were successful
the build was successful
2018-11-29 09:38:14 +01:00
f670c1c8a1
Abort if favicon is requested.
All checks were successful
the build was successful
2018-11-28 17:29:08 +01:00
75680b3739
Switched package generation from Ubuntu 16.04 to Debian stretch
All checks were successful
the build was successful
2018-11-28 16:48:17 +01:00
e9456be931
Added Debian package names for dependencies. 2018-11-28 16:21:26 +01:00
b0e267f13f
Refactored a tiny little bit.
All checks were successful
the build was successful
2018-11-28 16:15:10 +01:00
95741d99b8
Added warning about ressource usage with many users. 2018-11-28 16:10:12 +01:00