Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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: 127.0.0.1, server: polyneura.local, request: "POST /index.cgi HTTP/1.1", upstream: "http://127.0.0.1:5000". 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/SSLeay.so 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/SSLeay.so \ -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/SSLeay.so' +failed make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] 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: https://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz 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.


In reply to Re^2: Help with converting HTTP::Request to Plack::Request by knox
in thread Help with converting HTTP::Request to Plack::Request by knox

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-18 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found