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

Antwort: Re: Enhancement request for HEADERR4 module




http_getContentAttr() should have been http_getContentTypeAttr().


ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 31.03.2009 08:27:12:

>
>
> Hi Scott,
>
> Frankly I do not know the structure of all headers and I just tried to
make
> the procedures as general purpose as possible. However we then should add
> the following procedures:
>
>   http_getContentType()
>   http_getContentSubType()
>   http_getContentAttr()
>
> At least that is what I would need. Given the following header ...
>
>   Content-Type: multipart/related;
>      boundary=MIMEBoundaryurn_uuid_1F11A37EC6D8A08BD51237293151366;
>      type="text/xml";
> start="<0.urn:uuid:1F11A37EC6D8A08BD51237293151367@xxxxxxxxxx>"
>
> ... I need to know that it is "multipart" and the "boundary" and probably
> the first part "start" of the message. Other people may be interested in
> other attributes of the "Content-Type" header.
>
> Do you agree with that?
>
> Is it possible that there is more than one "Content-Type" header? I
assume
> the answer is no.
>
>
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 30.03.2009 19:17:04:
>
> > Hi Thomas,
> >
> > My problem with this proposal is that it would really only work for the
> > content-type header.  Each header has it's own structure, different
from
> > the others.
> >
> > The existing http_header() routine is designed to return the string
that
> > corresponds to a given header.  It does not make an attempt to parse
the
> > string, because the structure of the different headers is dissimilar.
> > If you need to break up the content-type, I suggest having a
> > http_getContentType() routine (which certainly can be put in HEADERR4)
> > that has logic specifically designed for the content-type header.
> >
> >
> >
> > thomas.raddatz@xxxxxx wrote:
> > >
> > > Hi,
> > >
> > > For WSDL2RPG I need some new procedures to get the "main" and "sub"
> header
> > > value from a given header in the header list. I also need a procedure
> to
> > > get a specific header attribute of a given header. Is someone
> interested in
> > > these procedures? If so, please let me know and I will add them to
HTTP
> > > API. Otherwise I will add them only to WSDL2RPG.
> > >
> > > Sample header value:
> > >
> > >   Content-Type: text/html; charset=ISO-8859-15
> > >
> > > Return values of the procedures:
> > >
> > >   http_header_value('content-type': 0)           ==> text
> > >   http_header_sub_value('content-type': 0)       ==> html
> > >   http_header_attr('content-type': 0: 'charset') ==> ISO-8859-15
> > >
> > > Syntax:
> > >
> > >   string = http_header_value(name: [pos])
> > >   string = http_header_sub_value(name: [pos])
> > >   string = http_header_attr(name: [pos]: attrName)
> > >
> > > Return values are without quotes (in case of quoted values)!
> > >
> > -----------------------------------------------------------------------
> > This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > -----------------------------------------------------------------------
>
>
> --
> IMPORTANT NOTICE:
> This email is confidential, may be legally privileged, and is for the
> intended recipient only. Access, disclosure, copying, distribution, or
> reliance on any of it by anyone else is prohibited and may be a criminal
> offence. Please delete if obtained in error and email confirmation
> to the sender.
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------


--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------