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

Re: Mime headers



Hi Charles,

HTTPAPI only creates files when you tell it to.

This situation just *smacks* of a bug in your code!

Perhaps your 'replyfile' variable contains a filename generated by 
something like this?

      replyfile = http_tempfile() + '.xml';

And perhaps you're processing the contents of replyfile only when rc=1? 
  But not processing (and also not deleting it) when rc<>1?!  That would 
certainly explain the problem.  (Yes, something is still downloaded when 
HTTPAPI returns an rc other than 1!)

That's just what it _sounds_ like.  To find out for real what's 
happening, you should consider debugging your code.


On 10/25/2010 1:46 PM, Versfelt, Charles wrote:
>
> Hi,
>
> You helped me with a project a while back (I couldn't have done it without you) and we are now live...
> Let me start by saying, thanks for the help!  I couldn't have done it without you.
>
> Everything appears to be working.  We're sending and receiving the data with no problem.
> But I just noticed something weird and I wanted to ask about it.
>
> I'm getting thousands of files appearing in my /tmp folder having to do with Mime headers.
>
> Just to recap my project:
> We're doing sends and recieves of XML files via HTTPS (online process) and SFTP (batch process) using
> HTTPAPI and CGIDEV2.  I have to include additional MIME headers
>
> Code for the additional MIME headers is as follows:
>
>    Header = 'MIME-Version: 1.0' + x'0d25' +
>             'Content-transfer-encoding: text' + x'0d25' +
>             'Request-number:1' + x'0d25' +
>             'Document-type: Request' + x'0d25';
>
> Code for the online transmit of the XML (after the data is all loaded up and ready to go) is as follows:
>
> / 5. Load the Mime headers and transmit file.
>
>     ContentType = 'application/PTI47';
>     http_xproc( HTTP_POINT_ADDL_HEADER
>               : %paddr(Add_Headers) );
>
> /    a.  Try orbitalvar1 URL.
>
>     rc = http_url_post_stmf(url1
>                           : reqstfile
>                           : replyfile
>                           : HTTP_TIMEOUT
>                           : HTTP_USERAGENT
>                           : ContentType );
>
> I was looking for some information on a particular run, and I noticed out on my /tmp folder that
> I have thousands and thousands of XML files out there, it looks like something in my process
> Is creating them, they contain an error referring Mime headers.
>
> I'm not sure if it's the files I'm sending or the ones I'm receiving that are causing the error.
>
> As far as I can tell, there is no real error--the XML files are getting created, going out, coming back... The data's going where it's supposed to and coming back as its supposed to.  Yet these files in /tmp exist.
>
> The files all start with /tmp/QACX* for example /tmp/QACXB0F0QP.xml
>
> They all contain this:
>
>   <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Response SYSTEM "Response_PTIx.d
> td"><Response><QuickResponse HcsTcsInd="T" MessageType="U" LangInd="" TzCode=""
> Version="2"><ProcStatus>05</ProcStatus><StatusMsg StatusMsgLth="51">The followin
> g mime-header was missing: CONTENT_TYPE</StatusMsg></QuickResponse></Response>
>
> It looks to me like I'm including ContentType in my send.
>
> Why would I be getting CONTENT_TYPE errors on mime-headers?
>
> How do I stop these errors from appearing in /tmp?
>
> Thanks,
> Charlie
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------