Code Monkey home page Code Monkey logo

Comments (5)

jvuletich avatar jvuletich commented on September 24, 2024

Hi John, Welcome to the Cuis community. I'm not sure that calling #asByteString is the right thing to do in the general case. So, I need something from you. I need to reproduce what you are seeing. What url are you trying to access? If you do (WebClient httpGet: url) content. what error do you get? Be as precise as possible, describe what you get in both cases, so anyone can help.

from cuis-smalltalk-dev.

JHonaker avatar JHonaker commented on September 24, 2024

Hi John, Welcome to the Cuis community.

Thanks!

I'm not sure that calling #asByteString is the right thing to do in the general case.

Yes, I'm not sure either. I have a feeling that SecureSocketStream is correctly encoding the data as a Unicode-encoded binary blob, and the server is expecting ASCII encoded text. I don't know enough about Unicode to verify that that's correct, but it's definitely different than the one generated from a String based URL. Perhaps there's a way to signal it as Unicode in the header.

Down to business.

I need to reproduce what you are seeing.

Of course.

Steps to reproduce the error (on both OpenSUSE Tumbleweed and Windows 10)

  1. Follow the installation instructions for installing via source. (Clone the Cuis-Smalltalk-Dev repository, download the VM, etc.) I'm using the Cuis6.0-5753.image that's provided straight out of the box.
  2. Open the World menu and click Open > Package Downloader.
  3. Answer, Yes, you'd like to install Package Downloader.
  4. Try to download any package. (For the sake of completeness, I was trying to install Tools-Finder version 1.5 from hernanwilkinson's repo.)
  5. The transcript will display Downloading Downloading https://raw.githubusercontent.com/hernanwilkinson/cuis-finder-asWidget/master/Tools-Finder.pck.st ...
    and the Debugger will open showing Error: SSL connect failed with code: -5 - Process: Morphic UI - Priority: 40.

I can get a working response by doing (WebClient httpGet: ('https://raw.githubusercontent.com/hernanwilkinson/cuis-finder-asWidget/master/Tools-Finder.pck.st' asByteString)) content in a Workspace. This is a little bit farther down the call stack in the previously mentioned debugger session.

Some interesting Workspace examples and findings

There are four simple examples that point to some interesting (perhaps separate) issues that are easily illustrated with the Workspace. Trying to Ctrl-p these lines does the following:

(WebClient httpGet: 'https://www.google.com') content

properly prints the contents of google.com.

(WebClient httpGet: 'http://www.google.com') content "NB: HTTP vs HTTPS"

also properly prints the contents of google.com.

(WebClient httpGet: ('https://www.google.com' asUnicodeString)) content

invokes the same SSL connect (code -5) error as the Package Downloader.

(WebClient httpGet: ('http://www.google.com' asUnicodeString)) content "NB: HTTP vs HTTPS"

raises a MessageNotUnderstood: UnicodeString>>unescapePercents error when WebRequest tries to escape percents from the rawURL instance variable (because it is UnicodeString vs String).

from cuis-smalltalk-dev.

jvuletich avatar jvuletich commented on September 24, 2024

Hi John. Thanks for the feedback. Based on this, the WebClient tests that were failing, and some experiments, I did some changes. Please pull the repo. Be sure to install all the updates, and reload the updated WebClient and Tests-WebClient packages. Test a bit. If you see further issues, please report them here or via email to the mail list.
Thanks!

from cuis-smalltalk-dev.

jvuletich avatar jvuletich commented on September 24, 2024

Assuming it went OK. Please reopen otherwise.

from cuis-smalltalk-dev.

JHonaker avatar JHonaker commented on September 24, 2024

@jvuletich Sorry for the delay. I was in a very big rush at work, and didn't have time to come back to verify things. Everything works now. Thank you for the quick response, and sorry again for the classic report and disappear.

from cuis-smalltalk-dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.