|
Yes - effectively a procedure in RESTSERV2 with the query string
representing the parms.
I guess I could try the rewrite and do it that way - but surely the
original should be workable.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On May 17, 2017, at 8:20 PM, Hiebert, Chris <chris.hiebert@xxxxxxxxxxxxxx> wrote:
partnum=0000011&quantity=5&partnum=0000011&quantity=5
So in this case, what does quantityquery represent?
Is it supposed to be a procedure in RESTSRV2?
Or are you trying to rewrite the url to:
partner400.com/cgi/restsrv2?function=quantityquery&
scriptaliasmatch:
If that's the case then you could try a rewrite rule just prior to your
new url to be passed back through URL mapping.
RewriteEngine On
RewriteRule ^/CGI/restsrv2/(.+)$ /CGI/restsrv2?function=$1 [QSA,PT]
ScriptAliasMatch ^/CGI/(.*) /QSYS.LIB/PARTNER400.LIB/$1.PGM
The QSA appends any current query string to the end of url, and PT the
author and do not necessarily represent those of the company.
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the
CGI and one for REST web services. I know I had both working. But ...
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Wednesday, May 17, 2017 2:50 PM
To: Web400@Midrange. Web400 <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] Changes/Bugs in Apache?
I was as sure as I can be Chris. But I am beginning to doubt my sanity.
There are only two alias entries in that config file - one for regular
now to try and find a solution that will work.
I am no longer chasing what obviously is not supposed to work and need
the main jury string for the parameters for the specific function so ...
I need to route to a program based on the first part of the URL and use
quantity=5&partnum=0000011&quantity=5
partner400.com/cgi/restsrv2/quantityquery?partnum=0000011&
"quantityquery" (as opposed to price query, quantity reserve, etc.
Should route to a program identified by "restsrv2" to invoke the
functions) using the provided parts and quantities.
chris.hiebert@xxxxxxxxxxxxxx> wrote:
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On May 17, 2017, at 3:04 PM, Hiebert, Chris <
author and do not necessarily represent those of the company.
The Apache server interprets that URL as
/QSYS.LIB/PARTNER400.LIB/RESTSRV1/PART1.PGM
Which is probably why you are having the issue.
Are you saying this actually worked on V7R1?
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the
for years. This might be the first time I have used it since moving to V7R3.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon
Paris
Sent: Saturday, May 13, 2017 5:30 PM
To: Web400@Midrange. Com <web400@xxxxxxxxxxxx>
Subject: [WEB400] Changes/Bugs in Apache?
I have this directive in my Apache config (actually in the vhosts but
...)
ScriptAliasMatch ^/CGI/(.*) /QSYS.LIB/PARTNER400.LIB/$1.PGM
I have not changed it (honestly) and I am sure that it has been working
the URL) I am getting very strange results.
When I try to use it with a REST web service (i.e. additional data in
http://partner400.com/cgi/prodrpt2oa> works just fine and runs the script
This URL http://partner400.com/cgi/prodrpt2oa <
correctly.
is called BUT the ".pgm" text then gets _added_ to the end of the URL. i.e.
This one http://partner400.com/cgi/restsrv1/part1
<http://partner400.com/cgi/restsrv1/part1> gives
Not Found
The script request is not valid. The script is not executable.
The log indicates that no PGM object was identified. So just for
chuckles I added .pgm to the base URL i.e:
http://partner400.com/cgi/restsrv1.pgm/part1
<http://partner400.com/cgi/restsrv1.pgm/part1>
That works - kind of ... the correct routing takes place and the script
"part1" is actually passed to the script as "part1.pgm". If I add a /
following "part1" then ".pgm" is seen as the next element in the path.
the .pgm workaround will not work for some scripts. For example this URL
I've searched for PTFs on the topic but am seeing nothing.
Anyone got any ideas? This is an Apache feature that we use a lot and
http://partner400.com/cgi/restsrv2.pgm/quantityquery/?
partnum=0000011&quantity=5 <http://partner400.com/cgi/
restsrv2.pgm/quantityquery/?partnum=0000011&quantity=5> tags the ".pgm"
onto the end of quantityquery <http://partner400.com/cgi/
restsrv2.pgm/quantityquery/?partnum=0000011&quantity=5> even when the
trailing / is present as shown.
http://archive.midrange.com/web400.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400http://archive.midrange.com/web400.
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
list
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.