Server returned HTTP response code: 403 google groups

View: New views
8 Messages — Rating Filter:   Alert me  

Server returned HTTP response code: 403 google groups

by Sonny To :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm trying to use Roman to access google groups RSS 2.0 feed

SyndFeedInput input = new SyndFeedInput();
URL url = new URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml")
SyndFeed feed = input.build(new XmlReader(url));

The code above throws
Caught: java.io.IOException: Server returned HTTP response code: 403
for URL: http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml

PHP SimpePie library can access it fine. any ideas?

thanks,
Sonny

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Server returned HTTP response code: 403 google groups

by Nick Lothian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try changing the user agent - it's likely that it is blocking the
default Java user agent

> -----Original Message-----
> From: Sonny To [mailto:son.c.to@...]
> Sent: Wednesday, August 29, 2007 2:06 PM
> To: dev@...
> Subject: Server returned HTTP response code: 403 google groups
>
> Hi,
> I'm trying to use Roman to access google groups RSS 2.0 feed
>
> SyndFeedInput input = new SyndFeedInput(); URL url = new
> URL("http://groups.google.com/group/diningphilosophers-jobs/fe
ed/rss_v2_0_msgs.xml")
> SyndFeed feed = input.build(new XmlReader(url));
>
> The code above throws
> Caught: java.io.IOException: Server returned HTTP response
> code: 403 for URL:
> http://groups.google.com/group/diningphilosophers-jobs/feed/rs
s_v2_0_msgs.xml

>
> PHP SimpePie library can access it fine. any ideas?
>
> thanks,
> Sonny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@... For
> additional commands, e-mail: dev-help@...
>
>

IMPORTANT: This e-mail, including any attachments, may contain private or confidential information.
If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail.
If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party.
This email represents the views of the individual sender, which do not necessarily reflect those of education.au limited except where the sender expressly states otherwise.
It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Server returned HTTP response code: 403 google groups

by Alejandro Abdelnur-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

change the user-agent header of the URLconnection not to have 'java' in it, that would do the trick.

On 8/29/07, Sonny To <son.c.to@...> wrote:
Hi,
I'm trying to use Roman to access google groups RSS 2.0 feed

SyndFeedInput input = new SyndFeedInput();
URL url = new URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml ")
SyndFeed feed = input.build(new XmlReader(url));

The code above throws
Caught: java.io.IOException: Server returned HTTP response code: 403
for URL: http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml

PHP SimpePie library can access it fine. any ideas?

thanks,
Sonny

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: Server returned HTTP response code: 403 google groups

by Sonny To :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

that did the trick. any idea why google groups is blocking java? Their
Calendar RSS feed works without modifying the user-agent. BTW wget is
blocked too if no user-agent is specified.

On 8/29/07, Alejandro Abdelnur <tucu00@...> wrote:

> change the user-agent header of the URLconnection not to have 'java' in it,
> that would do the trick.
>
>
> On 8/29/07, Sonny To < son.c.to@...> wrote:
> >
> > Hi,
> > I'm trying to use Roman to access google groups RSS 2.0 feed
> >
> > SyndFeedInput input = new SyndFeedInput();
> > URL url = new
> URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
> ")
> > SyndFeed feed = input.build(new XmlReader(url));
> >
> > The code above throws
> > Caught: java.io.IOException: Server returned HTTP response code: 403
> > for URL:
> http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
> >
> > PHP SimpePie library can access it fine. any ideas?
> >
> > thanks,
> > Sonny
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@...
> > For additional commands, e-mail: dev-help@...
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Server returned HTTP response code: 403 google groups

by wsdice707 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have the same problem here in working with ROME. But how to set the user agent. Can you please help me with the code sample that worked out ??

Thank you inadvance

dinesh


Sonny To wrote:
that did the trick. any idea why google groups is blocking java? Their
Calendar RSS feed works without modifying the user-agent. BTW wget is
blocked too if no user-agent is specified.

On 8/29/07, Alejandro Abdelnur <tucu00@gmail.com> wrote:
> change the user-agent header of the URLconnection not to have 'java' in it,
> that would do the trick.
>
>
> On 8/29/07, Sonny To < son.c.to@gmail.com> wrote:
> >
> > Hi,
> > I'm trying to use Roman to access google groups RSS 2.0 feed
> >
> > SyndFeedInput input = new SyndFeedInput();
> > URL url = new
> URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
> ")
> > SyndFeed feed = input.build(new XmlReader(url));
> >
> > The code above throws
> > Caught: java.io.IOException: Server returned HTTP response code: 403
> > for URL:
> http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
> >
> > PHP SimpePie library can access it fine. any ideas?
> >
> > thanks,
> > Sonny
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@rome.dev.java.net
> > For additional commands, e-mail: dev-help@rome.dev.java.net
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@rome.dev.java.net
For additional commands, e-mail: dev-help@rome.dev.java.net

Parent Message unknown RE: Server returned HTTP response code: 403 google groups

by jcfolsom :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


This doesn't have anything to do with ROME. If you're going to use the java URL class, you need to write out the request headers manually (i.e. User-Agent: myuseragent). Otherwise, there is the Rome feed fetcher and commons http client which have programmatic setUserAgent() methods.

Cheers,

J. Chris Folsom


-------- Original Message --------
Subject: Re: Server returned HTTP response code: 403 google groups
From: wsdice707 <dinesh707@...>
Date: Mon, July 13, 2009 3:41 am
To: dev@...


I have the same problem here in working with ROME. But how to set the user
agent. Can you please help me with the code sample that worked out ??

Thank you inadvance

dinesh



Sonny To wrote:
>
> that did the trick. any idea why google groups is blocking java? Their
> Calendar RSS feed works without modifying the user-agent. BTW wget is
> blocked too if no user-agent is specified.
>
> On 8/29/07, Alejandro Abdelnur <tucu00@...> wrote:
>> change the user-agent header of the URLconnection not to have 'java' in
>> it,
>> that would do the trick.
>>
>>
>> On 8/29/07, Sonny To < son.c.to@...> wrote:
>> >
>> > Hi,
>> > I'm trying to use Roman to access google groups RSS 2.0 feed
>> >
>> > SyndFeedInput input = new SyndFeedInput();
>> > URL url = new
>> URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> ")
>> > SyndFeed feed = input.build(new XmlReader(url));
>> >
>> > The code above throws
>> > Caught: java.io.IOException: Server returned HTTP response code: 403
>> > for URL:
>> http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> >
>> > PHP SimpePie library can access it fine. any ideas?
>> >
>> > thanks,
>> > Sonny
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>

--
View this message in context: http://www.nabble.com/Server-returned-HTTP-response-code%3A-403-google-groups-tp12380738p24457375.html
Sent from the Rome - Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@...

RE: Server returned HTTP response code: 403 google groups

by Nick Lothian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Or you can set the system property “user.agent” to anything you like

 

From: jcfolsom@... [mailto:jcfolsom@...]
Sent: Monday, 13 July 2009 8:50 PM
To: dev@...
Subject: RE: Server returned HTTP response code: 403 google groups

 


This doesn't have anything to do with ROME. If you're going to use the java URL class, you need to write out the request headers manually (i.e. User-Agent: myuseragent). Otherwise, there is the Rome feed fetcher and commons http client which have programmatic setUserAgent() methods.

Cheers,

J. Chris Folsom



-------- Original Message --------
Subject: Re: Server returned HTTP response code: 403 google groups
From: wsdice707 <dinesh707@...>
Date: Mon, July 13, 2009 3:41 am
To: dev@...


I have the same problem here in working with ROME. But how to set the user
agent. Can you please help me with the code sample that worked out ??

Thank you inadvance

dinesh



Sonny To wrote:
>
> that did the trick. any idea why google groups is blocking java? Their
> Calendar RSS feed works without modifying the user-agent. BTW wget is
> blocked too if no user-agent is specified.
>
> On 8/29/07, Alejandro Abdelnur <tucu00@...> wrote:
>> change the user-agent header of the URLconnection not to have 'java' in
>> it,
>> that would do the trick.
>>
>>
>> On 8/29/07, Sonny To < son.c.to@...> wrote:
>> >
>> > Hi,
>> > I'm trying to use Roman to access google groups RSS 2.0 feed
>> >
>> > SyndFeedInput input = new SyndFeedInput();
>> > URL url = new
>> URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> ")
>> > SyndFeed feed = input.build(new XmlReader(url));
>> >
>> > The code above throws
>> > Caught: java.io.IOException: Server returned HTTP response code: 403
>> > for URL:
>> http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> >
>> > PHP SimpePie library can access it fine. any ideas?
>> >
>> > thanks,
>> > Sonny
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>

--
View this message in context: http://www.nabble.com/Server-returned-HTTP-response-code%3A-403-google-groups-tp12380738p24457375.html
Sent from the Rome - Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@...



IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email.

RE: Server returned HTTP response code: 403 google groups

by Nick Lothian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Sorry – the correct system property is “http.agent”.

 

From: Nick Lothian [mailto:nlothian@...]
Sent: Tuesday, 14 July 2009 11:21 AM
To: dev@...
Subject: RE: Server returned HTTP response code: 403 google groups

 

Or you can set the system property “user.agent” to anything you like

 

From: jcfolsom@... [mailto:jcfolsom@...]
Sent: Monday, 13 July 2009 8:50 PM
To: dev@...
Subject: RE: Server returned HTTP response code: 403 google groups

 


This doesn't have anything to do with ROME. If you're going to use the java URL class, you need to write out the request headers manually (i.e. User-Agent: myuseragent). Otherwise, there is the Rome feed fetcher and commons http client which have programmatic setUserAgent() methods.

Cheers,

J. Chris Folsom


-------- Original Message --------
Subject: Re: Server returned HTTP response code: 403 google groups
From: wsdice707 <dinesh707@...>
Date: Mon, July 13, 2009 3:41 am
To: dev@...


I have the same problem here in working with ROME. But how to set the user
agent. Can you please help me with the code sample that worked out ??

Thank you inadvance

dinesh



Sonny To wrote:
>
> that did the trick. any idea why google groups is blocking java? Their
> Calendar RSS feed works without modifying the user-agent. BTW wget is
> blocked too if no user-agent is specified.
>
> On 8/29/07, Alejandro Abdelnur <tucu00@...> wrote:
>> change the user-agent header of the URLconnection not to have 'java' in
>> it,
>> that would do the trick.
>>
>>
>> On 8/29/07, Sonny To < son.c.to@...> wrote:
>> >
>> > Hi,
>> > I'm trying to use Roman to access google groups RSS 2.0 feed
>> >
>> > SyndFeedInput input = new SyndFeedInput();
>> > URL url = new
>> URL("http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> ")
>> > SyndFeed feed = input.build(new XmlReader(url));
>> >
>> > The code above throws
>> > Caught: java.io.IOException: Server returned HTTP response code: 403
>> > for URL:
>> http://groups.google.com/group/diningphilosophers-jobs/feed/rss_v2_0_msgs.xml
>> >
>> > PHP SimpePie library can access it fine. any ideas?
>> >
>> > thanks,
>> > Sonny
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>

--
View this message in context: http://www.nabble.com/Server-returned-HTTP-response-code%3A-403-google-groups-tp12380738p24457375.html
Sent from the Rome - Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@...

 


IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email.



IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email.