Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Help with converting HTTP::Request to Plack::Request

by knox (Sexton)
on Feb 10, 2020 at 20:15 UTC ( #11112740=note: print w/replies, xml ) Need Help??

in reply to Re: Help with converting HTTP::Request to Plack::Request
in thread Help with converting HTTP::Request to Plack::Request

The context: I had a working local FCGI script that i was converting to Plack step by step. It was going smoothly until it got to the posted code. For some reason I couldn't get an error code or line number, just: "failed (111: Connection refused) while connecting to upstream, client:, server: polyneura.local, request: "POST /index.cgi HTTP/1.1", upstream: "". I should have posted it here.

Plack/PSGI is server side. It doesnít, so far, make sense to answer your question with Plack code.

This was really helpful, it wasn't obvious to me until you mentioned it. While it didn't directly solve my problem, it was a light bulb moment for me as I thought that every type of request had to wrapped up in some sort of Plack handler.

Only the client knows about fragments; you can scan the YAML dump and see everything the server code gets.

This is cool, thanks! After further testing, I found that LWP::Protocol::https was not installed. This confused me, because it was working on my local fcgi script (I'll check this later). So I went through the process of installing LWP::Protocol::https which yielded more errors:

! Installing the dependencies failed: Module 'Net::SSLeay' is not inst +alled ! Bailing out the installation for IO-Socket-SSL-2.066.

! tail /home/<userhome>/.cpanm/work/1581360095.6546/build.log ^ rm -f blib/arch/auto/Net/SSLeay/ LD_RUN_PATH="/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu" cc -sha +red -O2 -L/usr -L/usr/lib -L/usr/local/lib -fstack-protector-strong +SSLeay.o -o blib/arch/auto/Net/SSLeay/ \ -L/usr -L/usr/lib -lssl -lcrypto -lz \ /usr/bin/ld: cannot find -lz collect2: error: ld returned 1 exit status Makefile:493: recipe for target 'blib/arch/auto/Net/SSLeay/' +failed make: *** [blib/arch/auto/Net/SSLeay/] Error 1 -> FAIL Installing Net::SSLeay failed. See /home/<userhome>/.cpanm/wor +k/1581360095.6546/build.log for details. Retry with --force to force +install it.

I found this: and installed sudo apt-get install zlib1g-dev. I haven't got around to changing to URI yet, but I will make some changes soon. Thanks for that. Apologies if this was long winded, but I figure someone out there could learn from my mistakes.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11112740]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2020-08-10 10:55 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (56 votes). Check out past polls.