You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by koji Lin <ko...@gmail.com> on 2008/01/04 05:37:04 UTC

About trackback sending in Roller4.0 not suitable in some sites

i found that my roller cant send trackback to lots site,
i think the http post code in trackback.java shoud change to this

original
        HttpMethod method = new PostMethod(trackbackURL);
        method.setQueryString(queryString);

new one
        PostMethod method = new PostMethod(trackbackURL);
        method.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded; charset=utf-8");
        method.setRequestBody(queryString);

the spec says we need content-Type
and QueryString will occur an error when i post to other sites.
so i change it to setRequestBody, and it works well now


koji

Re: About trackback sending in Roller4.0 not suitable in some sites

Posted by koji Lin <ko...@gmail.com>.
looks like the receiver must do the samething, somesite send trackback in
the body not in the QueryString.
sorry ignore the above line..oops

koji

2008/1/5, koji Lin <ko...@gmail.com>:
>
> and, i found some site can receive queryString, but wordpress cant receive
> string the first caharcter is "?"
>
> so i try to substring  queryString, like :
> method.setRequestBody(queryString.subString(1));
> then it can send trackback to wordpress.
> looks like the receiver must do the samething, somesite send trackback in
> the body not in the QueryString.
>
> i post this comment in a jira too.
>
> koji
>
> 2008/1/5, Dave <sn...@gmail.com>:
> >
> > On Jan 3, 2008 11:37 PM, koji Lin < koji.lin@gmail.com> wrote:
> > > i found that my roller cant send trackback to lots site,
> > > i think the http post code in trackback.java shoud change to this
> > >
> > > original
> > >         HttpMethod method = new PostMethod(trackbackURL);
> > >         method.setQueryString(queryString);
> > >
> > > new one
> > >         PostMethod method = new PostMethod(trackbackURL);
> > >         method.setRequestHeader("Content-Type",
> > > "application/x-www-form-urlencoded; charset=utf-8");
> > >         method.setRequestBody(queryString);
> > >
> > > the spec says we need content-Type
> > > and QueryString will occur an error when i post to other sites.
> > > so i change it to setRequestBody, and it works well now
> >
> > That looks like a good fix.I added it as a JIRA issue:
> > http://opensource.atlassian.com/projects/roller/browse/ROL-1645
> >
> > Thanks!
> >
> > - Dave
> >
>
>

Re: About trackback sending in Roller4.0 not suitable in some sites

Posted by koji Lin <ko...@gmail.com>.
and, i found some site can receive queryString, but wordpress cant receive
string the first caharcter is "?"

so i try to substring  queryString, like :
method.setRequestBody(queryString.subString(1));
then it can send trackback to wordpress.
looks like the receiver must do the samething, somesite send trackback in
the body not in the QueryString.

i post this comment in a jira too.

koji

2008/1/5, Dave <sn...@gmail.com>:
>
> On Jan 3, 2008 11:37 PM, koji Lin <ko...@gmail.com> wrote:
> > i found that my roller cant send trackback to lots site,
> > i think the http post code in trackback.java shoud change to this
> >
> > original
> >         HttpMethod method = new PostMethod(trackbackURL);
> >         method.setQueryString(queryString);
> >
> > new one
> >         PostMethod method = new PostMethod(trackbackURL);
> >         method.setRequestHeader("Content-Type",
> > "application/x-www-form-urlencoded; charset=utf-8");
> >         method.setRequestBody(queryString);
> >
> > the spec says we need content-Type
> > and QueryString will occur an error when i post to other sites.
> > so i change it to setRequestBody, and it works well now
>
> That looks like a good fix.I added it as a JIRA issue:
> http://opensource.atlassian.com/projects/roller/browse/ROL-1645
>
> Thanks!
>
> - Dave
>

Re: About trackback sending in Roller4.0 not suitable in some sites

Posted by Dave <sn...@gmail.com>.
On Jan 3, 2008 11:37 PM, koji Lin <ko...@gmail.com> wrote:
> i found that my roller cant send trackback to lots site,
> i think the http post code in trackback.java shoud change to this
>
> original
>         HttpMethod method = new PostMethod(trackbackURL);
>         method.setQueryString(queryString);
>
> new one
>         PostMethod method = new PostMethod(trackbackURL);
>         method.setRequestHeader("Content-Type",
> "application/x-www-form-urlencoded; charset=utf-8");
>         method.setRequestBody(queryString);
>
> the spec says we need content-Type
> and QueryString will occur an error when i post to other sites.
> so i change it to setRequestBody, and it works well now

That looks like a good fix.I added it as a JIRA issue:
http://opensource.atlassian.com/projects/roller/browse/ROL-1645

Thanks!

- Dave