2113 Commits

Author SHA1 Message Date
Unbit d3493df032 do not expode if Devel::StackTrace is missing 2014-02-26 17:06:21 +01:00
Unbit 757c76b569 fix -bash in perl hooks 2014-02-26 12:12:41 +01:00
Unbit 30eebfd335 better perl do usage and --perl-no-plack flag 2014-02-26 12:07:00 +01:00
Unbit c5d7d30439 try to better address #553 2014-02-26 11:39:00 +01:00
Ævar Arnfjörð Bjarmason 3480c30674 perl: Don't run BEGIN blocks twice in the provided *.psgi
The psgi loaded was calling perl_parse() with the script ostensibly to
set up xsinit.

However it would also call perl_parse() with the path to our *.psgi
file, whith the result that any BEGIN block in the *.psgi file would be
run twice, but anything outside BEGIN blocks would only run once.

This means that any code within explicit BEGIN blocks will run twice,
and any "use" statement in the *.psgi file will run its import() routine
twice, but due to the module being in %INC already we won't actually
compile things twice.

The previous behavior dates all the way back to the initial introduction
of the PSGI plugin in 299fd9c.

Then when support for local::lib was added in 7cbe751 we initially did a
perl_eval_pv() of a "use" statement like I'm doing here again now, but
later on in 1561dd3 changed it to call perl_parse with the commit
message "another PSGI loading fix".

Since there's no info on what that fixed or what was broken before I
have no idea if I'm introducing a regression here, but I don't see why
this way of loding local::lib shouldn't work, and it correctly munges
@INC for me when I try it.

We may still have this bug in the remaining perl_parse() calls that
remain for supporting "preinit" and "mule".

I haven't tested those modes (I don't use them), but when we load the
Perl apps we should only perl_parse() once with -e1, and then
perl_eval_pv() to actually load the application. We should not call
perl_parse() on code that we're just about to perl_eval_pv(), or we'll
run into this bug.

To test this just run:

    ./uwsgi --http 127.0.0.1:8080 --psgi ./t/perl/test.psgi

It'll no longer PANIC on the BEGIN block being run twice now, at least
in that simplistic non-"preinit" non-"mule" mode.
2014-02-25 18:07:42 +00:00
Unbit a7e6dfc469 fixed python 3 on old compilers, fixes #551 2014-02-25 07:05:46 +01:00
Roberto De Ioris 9e6a21602a more cgi improvements 2014-02-22 11:40:23 +01:00
Roberto De Ioris 952c4ce854 minor fixes in non-blocking reads 2014-02-22 11:13:50 +01:00
Roberto De Ioris 951f24e711 fixed #546 2014-02-22 10:46:46 +01:00
Unbit 8c8a7f77d1 added async remote signal management 2014-02-20 10:48:30 +01:00
Roberto De Ioris 930eb1e6aa fixed #541 2014-02-20 07:52:47 +01:00
Unbit 3e6ddbb3d5 added --php-exec-before/--php-exec-after 2014-02-15 08:59:56 +01:00
Unbit 6c986f8082 fixed pypy execute_source usage 2014-02-15 07:30:17 +01:00
Unbit 774f5a81a5 added --geoip-use-disk, fixes #519 2014-02-13 06:25:07 +01:00
INADA Naoki 8b799b4f9f logpipe: Don't setsid() twice. 2014-02-10 20:00:50 +09:00
Unbit d4298469ba fixed race condition in u_pypy_thread_attach() 2014-02-08 14:20:49 +01:00
Riccardo Magliocchetti 6e6efc5605 plugins/logpipe: check setsid return code
Reported by Coverity as CID #1167589
2014-02-08 12:52:20 +01:00
Unbit d878b65401 added first round of tests for psgi input with offset 2014-02-05 12:37:46 +01:00
Unbit ded149fc80 fixed perl stacktrace usage 2014-02-05 11:34:14 +01:00
Unbit f041d1095d perl refactoring 2014-02-05 11:21:01 +01:00
Andjelko Horvat b4915f778e CGI: remove double header_size check. 2014-02-04 16:32:36 +01:00
Andjelko Horvat 42dfa20f27 CGI: search and set Status header in RFC 3875 compliant way. 2014-02-03 12:03:25 +01:00
Unbit b5a0434710 fixed #513 2014-02-02 04:56:21 +01:00
Unbit 7a29d9649c added --pypy-paste and paste logging 2014-01-31 08:34:56 +01:00
Unbit 27cc164ebe added --pypy-ini-paste 2014-01-31 08:24:22 +01:00
Unbit 40be8fc916 fixed rpc 2014-01-29 09:08:44 +01:00
xiaost 6555c2804c simplified the python spooler code 2014-01-29 04:56:54 +08:00
xiaost c05082a8e4 fixed python spooler memory leak 2014-01-29 04:39:51 +08:00
Unbit df9a76a171 improve dotsplit support 2014-01-19 13:36:21 +01:00
Unbit b0e6d19d5c added --http-server-name-as-http-host 2014-01-16 07:12:56 +01:00
Unbit 7ff3584ad7 imrpvoed ruby1.8.7 support 2014-01-15 17:22:56 +01:00
Unbit 58af067bef fixed #507 2014-01-13 06:26:07 +01:00
Unbit d1285c6dc4 fixed harakiri tracebacker 2014-01-12 10:25:32 +01:00
Unbit a15de85811 another refactoring of subscription subsystem 2014-01-12 09:22:10 +01:00
Unbit 0b596bdf42 Merge branch 'master' of https://github.com/unbit/uwsgi 2014-01-09 20:13:42 +01:00
Unbit 4c4b08c36f fixed tuntap netmask 2014-01-09 20:13:23 +01:00
Unbit 1f0827abc8 fixed a busyness bug 2014-01-09 15:42:51 +01:00
Unbit 8eebc9f400 allows passing notify object to subscription packets 2014-01-09 12:59:36 +01:00
Unbit 0cf61abf9d improved ruby builder 2014-01-08 14:35:40 +00:00
Unbit 216aff3820 allows fixed binding for resubscription 2014-01-07 15:23:13 +01:00
Roberto De Ioris 843a3b18ad fixed hv_delete on clang 2014-01-05 09:35:49 +01:00
Unbit a0ff5b91b8 cast non-bytes arguments to bytes in python3 spool api 2014-01-05 09:08:29 +01:00
Unbit ea19e1e67b perl spool arg must be a hashref 2014-01-05 09:01:17 +01:00
Unbit 3d051e5d79 completed perl spooler support 2014-01-05 08:35:03 +01:00
Unbit 3b0d18c1ec directly call .to_s in the rack spool request 2014-01-05 06:25:31 +01:00
Unbit 15fa2be4ee preliminary refactoring for the spooler 2014-01-04 19:28:01 +01:00
Unbit f18ceea9bf fixed resubscription when different sockets type are in place 2014-01-04 10:12:03 +01:00
Unbit fbc1551112 do not forward signature in resubscriptions 2014-01-04 06:09:27 +01:00
Unbit b3bba48d1a add buffer-size configuration to the other routers 2014-01-03 17:24:40 +01:00
Unbit 18972d95a8 improved subscription system 2014-01-03 17:22:23 +01:00