Iceberg regex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Iceberg regex

Ian Ian
Yes.  That is how it is on github but there are private hit serveers.  My own, for example.  

I found it usable after I changed the regex in both classes where it exists.  


On Dec 26, 2017 4:14 AM, <[hidden email]> wrote:
Send Pharo-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Pharo-users digest..."

Today's Topics:

   1. Re: Strange 'Connection closed while waiting for data.' Zinc
      error (Yuriy Tymchuk)
   2. Re: Iceberg URL regex not matching how I would expect it to?
      (Juli?n Maestri)
   3. Re: Strange 'Connection closed while waiting for data.' Zinc
      error (Sven Van Caekenberghe)
   4. Breakpoints in Pharo (Andrei Stebakov)
   5. Re: Strange 'Connection closed while waiting for data.' Zinc
      error (Yuriy Tymchuk)
   6. Re: Strange 'Connection closed while waiting for data.' Zinc
      error (Sven Van Caekenberghe)


---------- Forwarded message ----------
From: Yuriy Tymchuk <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Mon, 25 Dec 2017 18:03:11 +0100
Subject: Re: [Pharo-users] Strange 'Connection closed while waiting for data.' Zinc error
Hi,

setting the reuse timeout to 0 or making a one shot client does not help. But while googling I found the exact issue described on the Pharo issue tracker: https://pharo.fogbugz.com/f/cases/18588/

The proposed workaround also worked for me:
ZnNetworkingUtils default socketStreamClass: SocketStream.

Cheers,
Uko

> On 25 Dec 2017, at 05:42, Andrew Glynn <[hidden email]> wrote:
>
> The only time I've seen that behaviour is with the combination of a slow server and a proxy such as CloudFlare where the sysadmin has set tcp_wait to some ridiculously small number.  Have you tried setting the connection reuse timeout to 0, or setting 'beOneShot'?
>
> Zinc doesn't support the additions in HTTP/2, but I can't offhand think of any reason that should cause that specific behaviour. I've had sufficient problems with HTTP/2 over slow connections (I live where there are no land lines of any kind) that I replaced the HTTP/2 code in Nginx with code from pureftpd in order to access my server at home when I'm out.
>
> Andrew
>
> On 2017-12-24, 3:30 PM, "Pharo-users on behalf of Yuriy Tymchuk" <[hidden email] on behalf of [hidden email]> wrote:
>
>    Hi,
>
>    I’m trying to hack something with Pharo 6.1 and Phillips Hue[1] (they have a simple REST API). When I try to do a GET request with Zinc like this:
>
>    ZnClient new
>       url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>       get
>
>    I get a “ConnectionClosed: Connection closed while waiting for data” exception. The service provides a JSON response that I can get without a problem by using a web browser or curl. Also if I try to access fewer data (e.g. adding /1 to the url, so it gets only one resource) I don’t get the exception.
>
>    What is even more strange, when I resume the exception I get the desired response i.e. this works:
>
>    [ ZnClient new
>       url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>       get ]
>
>       on: ConnectionClosed
>       do: [ :ex |
>               ex resumeUnchecked: ex defaultResumeValue ]
>
>    Of course I cannot share the server that is on my local network for resting, but maybe anyone knows it there are any known issues with Zinc, or if there are ways for me to debug the issue further.
>
>    Cheers.
>    Uko
>
>    [1]: https://www.developers.meethue.com
>
>
>
>





---------- Forwarded message ----------
From: "Julián Maestri" <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Mon, 25 Dec 2017 15:16:57 -0300
Subject: Re: [Pharo-users] Iceberg URL regex not matching how I would expect it to?
[hidden email]:/proj/proj.git

Isn't it: [hidden email]:user/project.git ?

On Dec 24, 2017 15:36, "Ian Ian" <[hidden email]> wrote:
Hi All,

I am having trouble setting up iceberg to access my repository via ssh.

On the command line I assess it via:  git clone [hidden email]:/proj/proj.git and all works as expected.

When adding trying to add the same repository to iceberg I get a parseUrl error thrown from class IceScpRemote.  While debugging I see the following regex:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?([\w\-]+)/([\w\-]+)(\.git)?' asRegex.

which parses [hidden email]:/directory/proj.git.

However fails to parse:  [hidden email]:/dir1/dir2/proj.git

The corrected version is as follows:

matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?(([\w\-]+)/)+([\w\-]+)(\.git)?' asRegex.

Questions:

Is this by design?
of the top of your head:  If I use the corrected version am I going to run into other issues?


NB:  I am using 64 bit Pharo 6.0 Update: #60520

Thanks in advance,




---------- Forwarded message ----------
From: Sven Van Caekenberghe <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Mon, 25 Dec 2017 20:03:27 +0100
Subject: Re: [Pharo-users] Strange 'Connection closed while waiting for data.' Zinc error


> On 25 Dec 2017, at 18:03, Yuriy Tymchuk <[hidden email]> wrote:
>
> Hi,
>
> setting the reuse timeout to 0 or making a one shot client does not help. But while googling I found the exact issue described on the Pharo issue tracker: https://pharo.fogbugz.com/f/cases/18588/
>
> The proposed workaround also worked for me:
> ZnNetworkingUtils default socketStreamClass: SocketStream.

You are on Windows I guess ?

> Cheers,
> Uko
>
>> On 25 Dec 2017, at 05:42, Andrew Glynn <[hidden email]> wrote:
>>
>> The only time I've seen that behaviour is with the combination of a slow server and a proxy such as CloudFlare where the sysadmin has set tcp_wait to some ridiculously small number.  Have you tried setting the connection reuse timeout to 0, or setting 'beOneShot'?
>>
>> Zinc doesn't support the additions in HTTP/2, but I can't offhand think of any reason that should cause that specific behaviour. I've had sufficient problems with HTTP/2 over slow connections (I live where there are no land lines of any kind) that I replaced the HTTP/2 code in Nginx with code from pureftpd in order to access my server at home when I'm out.
>>
>> Andrew
>>
>> On 2017-12-24, 3:30 PM, "Pharo-users on behalf of Yuriy Tymchuk" <[hidden email] on behalf of [hidden email]> wrote:
>>
>>   Hi,
>>
>>   I’m trying to hack something with Pharo 6.1 and Phillips Hue[1] (they have a simple REST API). When I try to do a GET request with Zinc like this:
>>
>>   ZnClient new
>>      url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>      get
>>
>>   I get a “ConnectionClosed: Connection closed while waiting for data” exception. The service provides a JSON response that I can get without a problem by using a web browser or curl. Also if I try to access fewer data (e.g. adding /1 to the url, so it gets only one resource) I don’t get the exception.
>>
>>   What is even more strange, when I resume the exception I get the desired response i.e. this works:
>>
>>   [ ZnClient new
>>      url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>      get ]
>>
>>      on: ConnectionClosed
>>      do: [ :ex |
>>              ex resumeUnchecked: ex defaultResumeValue ]
>>
>>   Of course I cannot share the server that is on my local network for resting, but maybe anyone knows it there are any known issues with Zinc, or if there are ways for me to debug the issue further.
>>
>>   Cheers.
>>   Uko
>>
>>   [1]: https://www.developers.meethue.com
>>
>>
>>
>>
>
>





---------- Forwarded message ----------
From: Andrei Stebakov <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Mon, 25 Dec 2017 20:51:51 -0500
Subject: [Pharo-users] Breakpoints in Pharo
Can I expect that break points in Pharo work in the same way as in Visual Works?
When I set a break point in Pharo (6.1 on Windows), it displays a red dot with an exclamation mark and when I send this message to an object, the debugger doesn't get invoked. 



---------- Forwarded message ----------
From: Yuriy Tymchuk <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Tue, 26 Dec 2017 08:21:50 +0100
Subject: Re: [Pharo-users] Strange 'Connection closed while waiting for data.' Zinc error
Hi Sven,

No, I’m on Mac (OS 10.13).

Cheers.
Uko

> On 25 Dec 2017, at 20:03, Sven Van Caekenberghe <[hidden email]> wrote:
>
>
>
>> On 25 Dec 2017, at 18:03, Yuriy Tymchuk <[hidden email]> wrote:
>>
>> Hi,
>>
>> setting the reuse timeout to 0 or making a one shot client does not help. But while googling I found the exact issue described on the Pharo issue tracker: https://pharo.fogbugz.com/f/cases/18588/
>>
>> The proposed workaround also worked for me:
>> ZnNetworkingUtils default socketStreamClass: SocketStream.
>
> You are on Windows I guess ?
>
>> Cheers,
>> Uko
>>
>>> On 25 Dec 2017, at 05:42, Andrew Glynn <[hidden email]> wrote:
>>>
>>> The only time I've seen that behaviour is with the combination of a slow server and a proxy such as CloudFlare where the sysadmin has set tcp_wait to some ridiculously small number.  Have you tried setting the connection reuse timeout to 0, or setting 'beOneShot'?
>>>
>>> Zinc doesn't support the additions in HTTP/2, but I can't offhand think of any reason that should cause that specific behaviour. I've had sufficient problems with HTTP/2 over slow connections (I live where there are no land lines of any kind) that I replaced the HTTP/2 code in Nginx with code from pureftpd in order to access my server at home when I'm out.
>>>
>>> Andrew
>>>
>>> On 2017-12-24, 3:30 PM, "Pharo-users on behalf of Yuriy Tymchuk" <[hidden email] on behalf of [hidden email]> wrote:
>>>
>>>  Hi,
>>>
>>>  I’m trying to hack something with Pharo 6.1 and Phillips Hue[1] (they have a simple REST API). When I try to do a GET request with Zinc like this:
>>>
>>>  ZnClient new
>>>     url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>>     get
>>>
>>>  I get a “ConnectionClosed: Connection closed while waiting for data” exception. The service provides a JSON response that I can get without a problem by using a web browser or curl. Also if I try to access fewer data (e.g. adding /1 to the url, so it gets only one resource) I don’t get the exception.
>>>
>>>  What is even more strange, when I resume the exception I get the desired response i.e. this works:
>>>
>>>  [ ZnClient new
>>>     url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>>     get ]
>>>
>>>     on: ConnectionClosed
>>>     do: [ :ex |
>>>             ex resumeUnchecked: ex defaultResumeValue ]
>>>
>>>  Of course I cannot share the server that is on my local network for resting, but maybe anyone knows it there are any known issues with Zinc, or if there are ways for me to debug the issue further.
>>>
>>>  Cheers.
>>>  Uko
>>>
>>>  [1]: https://www.developers.meethue.com
>>>
>>>
>>>
>>>
>>
>>
>
>





---------- Forwarded message ----------
From: Sven Van Caekenberghe <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Cc: 
Bcc: 
Date: Tue, 26 Dec 2017 10:14:54 +0100
Subject: Re: [Pharo-users] Strange 'Connection closed while waiting for data.' Zinc error


> On 26 Dec 2017, at 08:21, Yuriy Tymchuk <[hidden email]> wrote:
>
> Hi Sven,
>
> No, I’m on Mac (OS 10.13).

That is not good then, Uko, but again, there is no way to start debugging this without a reliable test case that I can run too.

Sven

> Cheers.
> Uko
>
>> On 25 Dec 2017, at 20:03, Sven Van Caekenberghe <[hidden email]> wrote:
>>
>>
>>
>>> On 25 Dec 2017, at 18:03, Yuriy Tymchuk <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> setting the reuse timeout to 0 or making a one shot client does not help. But while googling I found the exact issue described on the Pharo issue tracker: https://pharo.fogbugz.com/f/cases/18588/
>>>
>>> The proposed workaround also worked for me:
>>> ZnNetworkingUtils default socketStreamClass: SocketStream.
>>
>> You are on Windows I guess ?
>>
>>> Cheers,
>>> Uko
>>>
>>>> On 25 Dec 2017, at 05:42, Andrew Glynn <[hidden email]> wrote:
>>>>
>>>> The only time I've seen that behaviour is with the combination of a slow server and a proxy such as CloudFlare where the sysadmin has set tcp_wait to some ridiculously small number.  Have you tried setting the connection reuse timeout to 0, or setting 'beOneShot'?
>>>>
>>>> Zinc doesn't support the additions in HTTP/2, but I can't offhand think of any reason that should cause that specific behaviour. I've had sufficient problems with HTTP/2 over slow connections (I live where there are no land lines of any kind) that I replaced the HTTP/2 code in Nginx with code from pureftpd in order to access my server at home when I'm out.
>>>>
>>>> Andrew
>>>>
>>>> On 2017-12-24, 3:30 PM, "Pharo-users on behalf of Yuriy Tymchuk" <[hidden email] on behalf of [hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I’m trying to hack something with Pharo 6.1 and Phillips Hue[1] (they have a simple REST API). When I try to do a GET request with Zinc like this:
>>>>
>>>> ZnClient new
>>>>    url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>>>    get
>>>>
>>>> I get a “ConnectionClosed: Connection closed while waiting for data” exception. The service provides a JSON response that I can get without a problem by using a web browser or curl. Also if I try to access fewer data (e.g. adding /1 to the url, so it gets only one resource) I don’t get the exception.
>>>>
>>>> What is even more strange, when I resume the exception I get the desired response i.e. this works:
>>>>
>>>> [ ZnClient new
>>>>    url: 'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
>>>>    get ]
>>>>
>>>>    on: ConnectionClosed
>>>>    do: [ :ex |
>>>>            ex resumeUnchecked: ex defaultResumeValue ]
>>>>
>>>> Of course I cannot share the server that is on my local network for resting, but maybe anyone knows it there are any known issues with Zinc, or if there are ways for me to debug the issue further.
>>>>
>>>> Cheers.
>>>> Uko
>>>>
>>>> [1]: https://www.developers.meethue.com
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org

Reply | Threaded
Open this post in threaded view
|

Re: Iceberg regex

Holger Freyther

> On 26. Dec 2017, at 23:02, Ian Ian <[hidden email]> wrote:

Hey!


> Yes.  That is how it is on github but there are private hit serveers.  My own, for example.  
>
> I found it usable after I changed the regex in both classes where it exists.  

I tried to replace some of regexps with ZnUrl but some of the ssh/scp/git urls are not valid URIs and then tweaked it to include the port number. Maybe someone else has another pass it?

In PR#473[1] I mentioned git:[hidden email]:path as a non valid URL that is happily accepted by git itself. :}

holger


[1] https://github.com/pharo-vcs/iceberg/pull/473