182 Commits
Author SHA1 Message Date
Unbit 8f18c77587 fixed sharedarea waiting 2014-04-29 11:19:39 +02:00
Roberto De Ioris 6f671936fc added uwsgi::add_var to perl 2014-03-17 06:18:15 +01:00
Ævar Arnfjörð Bjarmason 13d8505738 perl: fix one-off error in 2.0-103-gf041d10 causing warnings in e.g. Plack::Request
This newly added support for read() offsets started causing "Use of
uninitialized value in subroutine entry" warnings.

This is all because there was a test for the number of items on the
stack, which ignored that the first argument is always the object, so 3
arguments to read() actually yields 4 arguments on the stack, not 3.

As a result we'd be calling SvIV() on a stack item that wasn't actually
passed in.
2014-03-15 21:05:18 +00:00
Ævar Arnfjörð Bjarmason af95f90fb0 perl: fix trivial spelling error in psgi_loader.c error message 2014-03-15 13:47:07 +00:00
Ævar Arnfjörð Bjarmason 97809192c8 perl: fix a regression with caller() not indicating the starting *.psgi program
In 2.0.1-41-g3480c30 I introduced a regression with how the top-level
stackframe would appear within Perl programs. Before we'd show the
filename of the *.psgi file, but after we just showed "-e".

We can retain the bugfix I added in 2.0.1-41-g3480c30 while having a
sensible stacktrace by overriding the file via the #line directive.
2014-03-15 13:10:30 +00:00
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 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
Roberto De Ioris 843a3b18ad fixed hv_delete on clang 2014-01-05 09:35:49 +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 f3e164b397 fixed return value in hv_store 2013-12-26 18:57:52 +01:00
Unbit c9324c06ca implemented perl spooler and fixed a leak in the CPython one 2013-12-17 06:50:47 +01:00
Unbit 4e260fa8a1 fixed #476 and #477 2013-12-14 07:45:38 +01:00
Unbit bb4be12fda implemented more async api in lua 2013-12-13 11:51:05 +01:00
Unbit 6e2adf9cf3 added support for async api to lua 2013-12-12 13:42:12 +01:00
Unbit d81330c514 support IO object is perl async mode too 2013-12-07 09:52:51 +00:00
Unbit 441013b71b added mule support for symcall and more robust check for psgi response 2013-12-07 09:07:42 +00:00
Unbit b934ac9588 refactored sharedarea read 2013-11-30 18:30:52 +00:00
Unbit 46cceb0465 croak if the psgi streamer fails 2013-11-30 14:30:22 +00:00
Unbit c99f5d0875 fixed sharedarea_wait perl api 2013-11-30 12:46:17 +01:00
Unbit 60b54c4d7c allows sending websockets messages directly from a sharedarea 2013-11-30 11:19:28 +00:00
Unbit ace79b1179 various websockets and sharedarea optimizations 2013-11-30 10:41:56 +00:00
Roberto De Ioris 9993e3710c first attempt of uwsgi_sharedarea_readfast 2013-11-30 07:31:57 +01:00
Roberto De Ioris 98541dbc65 more sharedarea improvements 2013-11-30 07:23:05 +01:00
Unbit e4d3d209c8 allows sharedarea_wait to specify the freq 2013-11-29 13:32:30 +00:00
Unbit 5182eaf485 another round of sharedarea implementations 2013-11-29 12:47:59 +00:00
Roberto De Ioris 150f0c631e fixed plain (without suspend engine) async mode 2013-11-28 06:47:36 +01:00
Roberto De Ioris 4805a9c219 added chunked input api to psgi 2013-11-14 07:44:13 +01:00
Roberto De Ioris 882cdcc2b6 added --plshell and Perl uwsgi::rpc 2013-11-14 06:24:56 +01:00
Unbit 72ecc217f7 perl passes the 64bit rpc test 2013-11-11 13:43:21 +01:00
Unbit def65c4793 fixed python, perl and ruby rpc 64bit 2013-11-11 13:06:16 +01:00
Unbit 26386909de first attempt of moving rpc output from 16 to 64 bit 2013-11-11 13:00:20 +01:00
Unbit 20b5b7b0dc added support for uwsgi::connection_fd and psgix.io 2013-11-11 08:22:01 +01:00
Unbit af6eaf6737 completed perl metric api 2013-10-19 09:54:28 +02:00
Unbit 03879fdc0c first test for metric api from apps (perl only) 2013-10-18 09:35:04 +02:00
Unbit 192312e3ea avoid crashing on non-conformant PSGI response headers 2013-10-07 10:21:39 +02:00
Unbit 58abd07a88 support remote sources for perl scripts 2013-10-07 10:11:50 +02:00
Unbit 706f1b59c3 make clang happy 2013-10-07 09:52:32 +02:00
Unbit ddbc8920f7 use uwsgi_open_and_read for perl files 2013-10-07 09:50:56 +02:00
Roberto De Ioris 7e3bf6868e fixed perl autoreload when under clang 2013-10-06 11:01:12 +02:00
Unbit 4c7ecef577 added perl auto reloader 2013-10-06 10:52:27 +02:00
Unbit 8918e81256 first attempt to change from strtok to strtok_r 2013-09-17 15:00:33 +02:00
Unbit 4f9e2ff3f6 added --perl-exec and --perl-exec-post-fork 2013-08-23 11:50:18 +02:00
Roberta Giordano ab12703a11 added new set_user_harakiri to python,pypy,perl and ruby 2013-06-15 07:04:53 +02:00