[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: HTTP/1.1 412 Precondition Failed



Be sure to cleanse the debug log before sending it...Look for user id/password/credit card numbers/etc. Just replace with xxxxx.

Leave as much as you can though and be sure to not change ANY punctuation.


> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
> Sent: Wednesday, February 24, 2010 3:15 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: RE: HTTP/1.1 412 Precondition Failed
> 
> Debug log please. See example1 for details.
> 
> > -----Original Message-----
> > From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> > bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Versfelt, Charles
> > Sent: Wednesday, February 24, 2010 2:46 PM
> > To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: RE: HTTP/1.1 412 Precondition Failed
> >
> >
> > I'm still getting the HTTP/1.1 412 Precondition Failed, I've tried
> > several tweaks to the XML itself, not sure if there's an issue in the
> > XML or if the folks at Paymentech can guide me on this.  Here's what
> > I'm doing:
> >
> > 1.  First I clear the buffer and get my XML template
> >
> > callp ClrHtmlBuffer();
> > callp gethtml('HTMLSRC':'MYLIBRARY':'OPBXML1':
> > '<as400>');
> >
> > 2.  I get my variable fields from a work file and load them.
> >
> > read dmgtopfl;
> > callp UpdHtmlVar('OCUSER':OCUSER);
> > callp UpdHtmlVar('OCPASS':OCPASS);
> > callp UpdHtmlVar('OCINDS':OCINDS);
> >
> > (there are more)
> >
> > CodePage = 819;
> > XML_Output = 'TestFile1.xml';
> > ContentType = 'text/xml';
> >
> > (I've tried it with ContentType '*OMIT', and with ContentType 'xml',
> > and with ContentType blank.)
> >
> > 3.  Write my section, my html to stmf
> >
> > callp wrtsection('NEWORD');
> > rc = WrtHtmlToStmf(XML_Output:CodePage);
> >
> > 4.   rc = http_url_post_stmf('https://mysite' +
> >                          '/folder/'
> >                         : '/home/CHARLIE/TestFile1.xml'
> >                         : '/home/CHARLIE/ReplyFile1.xml'
> >                         : HTTP_TIME99
> >                         : HTTP_USERAGENT
> >                         : ContentType );
> >
> > FYI, I created
> >
> > D HTTP_TIME99    C                   CONST(99)
> >
> > I was originally using HTTP_TIMEOUT
> >
> > I figured a little more time might help?  Probably not.
> >
> > Do you need to see the XML document also, or can you see what I'm
> doing
> > wrong?
> >
> > Thanks,
> > Charlie
> >
> >
> > Message: 2
> > Date: Tue, 23 Feb 2010 14:34:05 -0600
> > From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
> > Subject: Re: Getting closer?  New error
> > To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > Message-ID: <4B843BBD.2010103@xxxxxxxxxxxxxxxx>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > The good news is that you must be communicating with an HTTP ser
> >
> > , because you're getting a response (412 Precondition Failed) from
> that
> > server.
> >
> > The bad news is that you're doing something wrong in your request.
> The
> > most likely cause is that you're calling one of the GET routines, and
> > passing the 'peModTime' (modification time) parameter.  If you ask
> for
> > a resource on the server, and that resource hasn't been modified
> since
> > the time you specified in peModTime, you will get a 412 Precondition
> > Failed error -- that's to alert you that the condition ("must be
> > modified since
> > XX/XX/XX) could not be satisified... in other words, the data hasn't
> > changed since that date/time.
> >
> > Unless you have a good reason to check if something was modified
> since
> > a given date/time, I'd suggest passing *OMIT for the peModTime
> > parameter.
> >
> > If you aren't using a GET routine and passing this parameter, then
> you
> > need to explain better what you're doing.  (Or better yet, post a
> trace
> > file.)
> >
> > ---------------------------------------------------------------------
> --
> > This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > ---------------------------------------------------------------------
> --
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------