You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Daniel Cunha <da...@apache.org> on 2019/12/20 16:20:06 UTC

Meecrowave Proxy

Hi folks,

I'm trying configure a proxy with meecrowave, I can see the test working
fine:
https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/test/java/org/apache/meecrowave/proxy/servlet/ProxyServletTest.java

I'm try creating a route like:

{
  "id": "example-route",
  "requestConfiguration": {
    "method": "GET",
    "prefix": "/"
  },
  "responseConfiguration": {
    "target": "http://example.com/"
  }
}

It is not working. Something wrong in my configuration?
I'm getting always timeout for it, but I'm using the default values for
timeouts.

-- 
Daniel "soro" Cunha
https://twitter.com/dvlc_

Re: Meecrowave Proxy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Daniel,

think [1] is ok (to flatten headers), was the choice aligned on CXF (since
we are using JAX-RS as client). This is not specified in the spec and we
just picked the default since it is what should be done by the impl until
you configure it explicitly in cxf.
For skip*, yes, default is to ignore if not set for security reasons.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 26 déc. 2019 à 14:06, Daniel Cunha <da...@apache.org> a écrit :

> Hi Romain,
>
> Should it[1] be: *request = request.header(name, req.getHeader(name));*
> instead of *request = request.header(name, list(req.getHeaders(name))); ?*
> I see which it just copy headers if I have the skippedHeaders declared, so
> if I want to copy the headers without skip, I need to declare it with a
> empty list like: "skippedHeaders": []. same behavior for cookies.
>
>
> [1]
>
> https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/main/java/org/apache/meecrowave/proxy/servlet/front/ProxyServlet.java#L127
>
> Em sex., 20 de dez. de 2019 às 14:15, Daniel Cunha <da...@apache.org>
> escreveu:
>
> > Hi Romain,
> >
> > Ok, good catch! But my issue here was releated with the SQUID/ProxyHTTP
> of
> > the company.
> > They needed to allow the URL which I was trying calling. :P
> >
> > Anyway, thank you man! :)
> >
> > Em sex., 20 de dez. de 2019 às 13:46, Romain Manni-Bucau <
> > rmannibucau@gmail.com> escreveu:
> >
> >> Hi Daniel,
> >>
> >> It is a NPE in cookies without domain, will be fixed for next release
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >> <https://rmannibucau.metawerx.net/> | Old Blog
> >> <http://rmannibucau.wordpress.com> | Github <
> >> https://github.com/rmannibucau> |
> >> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >> >
> >>
> >>
> >> Le ven. 20 déc. 2019 à 17:20, Daniel Cunha <da...@apache.org> a
> >> écrit :
> >>
> >> > Hi folks,
> >> >
> >> > I'm trying configure a proxy with meecrowave, I can see the test
> working
> >> > fine:
> >> >
> >> >
> >>
> https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/test/java/org/apache/meecrowave/proxy/servlet/ProxyServletTest.java
> >> >
> >> > I'm try creating a route like:
> >> >
> >> > {
> >> >   "id": "example-route",
> >> >   "requestConfiguration": {
> >> >     "method": "GET",
> >> >     "prefix": "/"
> >> >   },
> >> >   "responseConfiguration": {
> >> >     "target": "http://example.com/"
> >> >   }
> >> > }
> >> >
> >> > It is not working. Something wrong in my configuration?
> >> > I'm getting always timeout for it, but I'm using the default values
> for
> >> > timeouts.
> >> >
> >> > --
> >> > Daniel "soro" Cunha
> >> > https://twitter.com/dvlc_
> >> >
> >>
> >
> >
> > --
> > Daniel "soro" Cunha
> > https://twitter.com/dvlc_
> >
>
>
> --
> Daniel "soro" Cunha
> https://twitter.com/dvlc_
>

Re: Meecrowave Proxy

Posted by Daniel Cunha <da...@apache.org>.
Hi Romain,

Should it[1] be: *request = request.header(name, req.getHeader(name));*
instead of *request = request.header(name, list(req.getHeaders(name))); ?*
I see which it just copy headers if I have the skippedHeaders declared, so
if I want to copy the headers without skip, I need to declare it with a
empty list like: "skippedHeaders": []. same behavior for cookies.


[1]
https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/main/java/org/apache/meecrowave/proxy/servlet/front/ProxyServlet.java#L127

Em sex., 20 de dez. de 2019 às 14:15, Daniel Cunha <da...@apache.org>
escreveu:

> Hi Romain,
>
> Ok, good catch! But my issue here was releated with the SQUID/ProxyHTTP of
> the company.
> They needed to allow the URL which I was trying calling. :P
>
> Anyway, thank you man! :)
>
> Em sex., 20 de dez. de 2019 às 13:46, Romain Manni-Bucau <
> rmannibucau@gmail.com> escreveu:
>
>> Hi Daniel,
>>
>> It is a NPE in cookies without domain, will be fixed for next release
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://rmannibucau.metawerx.net/> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >
>>
>>
>> Le ven. 20 déc. 2019 à 17:20, Daniel Cunha <da...@apache.org> a
>> écrit :
>>
>> > Hi folks,
>> >
>> > I'm trying configure a proxy with meecrowave, I can see the test working
>> > fine:
>> >
>> >
>> https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/test/java/org/apache/meecrowave/proxy/servlet/ProxyServletTest.java
>> >
>> > I'm try creating a route like:
>> >
>> > {
>> >   "id": "example-route",
>> >   "requestConfiguration": {
>> >     "method": "GET",
>> >     "prefix": "/"
>> >   },
>> >   "responseConfiguration": {
>> >     "target": "http://example.com/"
>> >   }
>> > }
>> >
>> > It is not working. Something wrong in my configuration?
>> > I'm getting always timeout for it, but I'm using the default values for
>> > timeouts.
>> >
>> > --
>> > Daniel "soro" Cunha
>> > https://twitter.com/dvlc_
>> >
>>
>
>
> --
> Daniel "soro" Cunha
> https://twitter.com/dvlc_
>


-- 
Daniel "soro" Cunha
https://twitter.com/dvlc_

Re: Meecrowave Proxy

Posted by Daniel Cunha <da...@apache.org>.
Hi Romain,

Ok, good catch! But my issue here was releated with the SQUID/ProxyHTTP of
the company.
They needed to allow the URL which I was trying calling. :P

Anyway, thank you man! :)

Em sex., 20 de dez. de 2019 às 13:46, Romain Manni-Bucau <
rmannibucau@gmail.com> escreveu:

> Hi Daniel,
>
> It is a NPE in cookies without domain, will be fixed for next release
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le ven. 20 déc. 2019 à 17:20, Daniel Cunha <da...@apache.org> a
> écrit :
>
> > Hi folks,
> >
> > I'm trying configure a proxy with meecrowave, I can see the test working
> > fine:
> >
> >
> https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/test/java/org/apache/meecrowave/proxy/servlet/ProxyServletTest.java
> >
> > I'm try creating a route like:
> >
> > {
> >   "id": "example-route",
> >   "requestConfiguration": {
> >     "method": "GET",
> >     "prefix": "/"
> >   },
> >   "responseConfiguration": {
> >     "target": "http://example.com/"
> >   }
> > }
> >
> > It is not working. Something wrong in my configuration?
> > I'm getting always timeout for it, but I'm using the default values for
> > timeouts.
> >
> > --
> > Daniel "soro" Cunha
> > https://twitter.com/dvlc_
> >
>


-- 
Daniel "soro" Cunha
https://twitter.com/dvlc_

Re: Meecrowave Proxy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Daniel,

It is a NPE in cookies without domain, will be fixed for next release


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 20 déc. 2019 à 17:20, Daniel Cunha <da...@apache.org> a écrit :

> Hi folks,
>
> I'm trying configure a proxy with meecrowave, I can see the test working
> fine:
>
> https://github.com/apache/openwebbeans-meecrowave/blob/master/meecrowave-proxy/src/test/java/org/apache/meecrowave/proxy/servlet/ProxyServletTest.java
>
> I'm try creating a route like:
>
> {
>   "id": "example-route",
>   "requestConfiguration": {
>     "method": "GET",
>     "prefix": "/"
>   },
>   "responseConfiguration": {
>     "target": "http://example.com/"
>   }
> }
>
> It is not working. Something wrong in my configuration?
> I'm getting always timeout for it, but I'm using the default values for
> timeouts.
>
> --
> Daniel "soro" Cunha
> https://twitter.com/dvlc_
>