Re: [blogite] Pingback misc

Date view Thread view Subject view Author view Attachment view

From: Ian Hickson (ian@hixie.ch)
Date: Sun Sep 08 2002 - 21:24:05 BST


On Sun, 8 Sep 2002, Jim Dabell wrote:
> >
> > Open socket, or die screaming.
> > Start reading by line. If we have a <link>, record it, and drop out of
> > loop.
> > Otherwise, read next line and try again until:
> > a) We have a <link> (/\<link rel\=\"pingback\"
> > href\=\"http:\/\/(.*)\"(.*)(\/?)>/i)
> > b) We have a <body> (Not yet implimented, but planned)
> > c) We have an EOF
> > d) We have read 50 lines.
> > Close connection, Do whatever I want to with loop.
> > (PHP Code at http://www.aquarionics.com/src/admin/addentry.phps,
>
> Well that breaks when:
>
> a) you have commented out your pingback element

Per the spec, you're not allowed to.

> b) you don't have rel as the first attribute (for instance, the xslt
> processor I use reverses the order of the attributes in some instances)

Per the spec, you're not allowed to.

> I'd imagine that there are loads of corner-cases where a html parser will
> get it right but a fancy regexp won't, even with valid html.

There are more than several corner cases -- even very, very simple cases
can't easily be catered for by a regexp.

However, the spec gets around this by explicitly calling out what regular
expression pingback UAs should use, so that all pingback clients will be
interoperable.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Message sent over the Blogite mailing list.
Archives:     http://www.aquarionics.com/misc/archives/blogite/
Instructions: http://www.aquarionics.com/misc/blogite/

Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.5 : Sun Sep 08 2002 - 23:05:00 BST