LiveCode Server

Lagi Pittas iphonelagi at gmail.com
Thu Oct 17 11:24:03 EDT 2019


Hi Everybody


If anybody else (Mark? even) has any insights

We have found this function libURLLastRHheaders, which seems to get the
last headers set to the server.
 In the documentation, it indicates that it works on the Server version.

We put it in the server code, but get the following error which indicates
that the lib is NOT included on the server.

<pre>
file "/var/www/html/xb_admin_accountant_new.lc"
  row 12, col 8: Function: error in function handler (libURLLastRHHeaders)
  row 12, col 8: put: error in expression
</pre>

My question is, does the internet lib work on LC Server so we can call
libURLLastRHHeaders?

If YES, then which files do we add to the server and where. Also, do we
need to add an include line in the script to load the function?


Thanks for your help


Regards Lagi (and Todd)

btw

There is no  $_SERVER["HTTP_Authorization"] in the docs the closest is
$_SERVER["HTTP] but since
the code gives an error and the return is empty it's a moot point.




On Thu, 17 Oct 2019 at 15:13, Ralf Bitter via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Lagi, sorry for not expressing myself well. Of course I
> meant the whole process including reading HTTP
> headers on the server.
> This means $_SERVER["HTTP_Authorization"]
> should not be empty in your case
>
>
> Ralf
>
>
>
> > On 17. Oct 2019, at 15:51, Lagi Pittas via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > Hi Ralf,
> >
> > The problem isn't the sending of the headers but reading them using
> > livecode server.
> > We are using Linux servers so the Mac problem is not an issue.
> >
> > Via PHP the call is get_headers ( string $url [, int $format = 0 [,
> > resource $context ]] ) : array
> >
> > Basically is there a way of doing that in pure livecode server?
> >
> > Regards Lagi (and Todd)
> >
> > On Thu, 17 Oct 2019 at 14:18, Ralf Bitter via use-livecode <
> > use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
> wrote:
> >
> >> Todd, sending Authorization HTTP request headers
> >> to LC server on Linux should work. I have
> >> troubles with request headers too, but only on Mac OS.
> >>
> >>
> >> Ralf
> >>
> >>
> >>
> >>> On 17. Oct 2019, at 13:56, Todd Fabacher via use-livecode <
> >> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
> wrote:
> >>>
> >>> Hello all,
> >>>
> >>> We are running LC Server Scripts to process some DB request and we
> >>> want to do basic validation by passing a token from the App to the
> >>> server script.
> >>>
> >>> The problem is I can not find where I can get the headers on the
> >>> server. I looked in $_SERVER, but not there. I see the CONTENT_TYPE
> >>> and HTTP ACCEPTS which I set in my header, but I can's find anything
> >>> else from the header that was posted.
> >>>
> >>> Does anyone know how to read an "Authorization: Bearer" header in
> >>> LiveCode Script on the server?? Thanks for the help.
> >>>
> >>> --Todd Fabacher
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list