Help sending binary data with HTTP put

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

Help sending binary data with HTTP put

cdavidshaffer
I'm getting a walkback:

"Actually putting to AWS/S3 via Cloudfork but this code snippet demonstrates problem"
request := Net.HttpRequest put: 'http://yahoo.com'.
request
        body: (Net.SimpleBody new source: #[1 2 3] readStream);
        contentLength: 3;
        shouldChunk: false.
request execute

If I execute this request I get the walkback (in vw7.9) pasted below.  I'm sure that I'm missing something simple...just can't seem to find it in NetClientDevGuide.  Any pointers would be appreciated.

David

Unhandled exception: No character available for character value 1
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
ByteStreamEncoder>>write:on:
EncodedStream>>nextPut:
Net.SimpleBody>>byteValueAsStream
Net.SimpleBody>>writeOn:
Net.HttpWriteHandler>>startSimpleBody:
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Net.SimpleBody>>acceptVisit:with:
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Net.HttpDispatcher>>acceptMessage:with:
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Net.HttpProtocolInterpreter>>executeWithConnection:
Net.HttpProtocolInterpreter>>executeRequest:
Net.HttpClient>>privateExecuteRequest
Net.HttpClient>>executeRequestDo:
Net.HttpClient>>executeAndGetResponse
Net.HttpClient>>executeRequest:
optimized [] in Net.HttpRequest>>execute
BlockClosure>>ensure:
Net.HttpRequest>>execute
UndefinedObject>>unboundMethod
UndefinedObject(Object)>>performMethod:arguments:
UndefinedObject(Object)>>performMethod:
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
optimized [] in TextEditorController>>evaluateSelection
BlockClosure>>ensure:
Cursor>>showWhile:
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
optimized [] in TextEditorController>>doIt
BlockClosure>>on:do:
HighlightingTextEditorController(TextEditorController)>>doIt
WorkspacePage>>doIt
Workbook(AbstractWorkspace)>>smalltalkDoIt
MenuBarButtonController>>dispatchMenuSymbol:
MenuBarButtonController>>dispatchMenuSelection:
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>ensure:
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>on:do:
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
OrderedCollection>>do:
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
PrefocusKeypressEvent>>dispatchTo:
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:for:
EventDispatcher>>dispatchEvent:
KeyPressedEvent(Event)>>dispatch
KeyPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
Receiver:
        an IllegalCharacterStreamErrorPolicy
Instance Variables:
        streamEncoder = nil
Arguments:
        aCharacter = 1
        aStream = a ReadWriteStream
Context PC = 26

----------------------------------------------------------------------
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
Receiver:
        a ByteStreamEncoder
Instance Variables:
        encoder = a ByteCharacterEncoder
        errorPolicy = an IllegalCharacterStreamErrorPolicy
        skipRecord = a PositionRecord
Arguments:
        aCharacter = 1
        aStream = a ReadWriteStream
Context PC = 7

----------------------------------------------------------------------
ByteStreamEncoder>>write:on:
Receiver:
        a ByteStreamEncoder
Instance Variables:
        encoder = a ByteCharacterEncoder
        errorPolicy = an IllegalCharacterStreamErrorPolicy
        skipRecord = a PositionRecord
Arguments:
        c = 1
        aStream = a ReadWriteStream
Temporaries:
        code = 65535
Context PC = 15

----------------------------------------------------------------------
EncodedStream>>nextPut:
Receiver:
        an EncodedStream
Instance Variables:
        binary = false
        stream = a ReadWriteStream
        encoder = a ByteStreamEncoder
        policy = nil
        lineEndConvention = 4
        lineEndCharacter = nil
        skipSize = a PositionRecord
Arguments:
        anObject = 1
Context PC = 19

----------------------------------------------------------------------
Net.SimpleBody>>byteValueAsStream
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Temporaries:
        stream = an EncodedStream on a ReadWriteStream with a ByteStreamEncoder
        encoding = 'us-ascii'
Context PC = 103

----------------------------------------------------------------------
Net.SimpleBody>>writeOn:
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Arguments:
        aStream = an ExternalReadAppendStream
Temporaries:
        input = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpWriteHandler>>startSimpleBody:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aSimpleBody = 

Context PC = 6

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a Net.HttpDispatcher
        .aSimpleBody = 

Context PC = 8

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.MimeDispatcher>>acceptSimpleBody:with:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aSimpleBody = 

        argument = nil
Context PC = 20

----------------------------------------------------------------------
Net.SimpleBody>>acceptVisit:with:
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Arguments:
        aVisitor = a Net.HttpDispatcher
        argument = nil
Context PC = 5

----------------------------------------------------------------------
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
        an UndefinedObject
Temporaries:
        .aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        .self = a Net.HttpDispatcher
        .argument = nil
Context PC = 8

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aBlock = BlockClosure [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Context PC = 3

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
        an UndefinedObject
Temporaries:
        .aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        .self = a Net.HttpDispatcher
        .argument = nil
Context PC = 32

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.MimeDispatcher>>acceptMessage:with:
        outerContext = nil
        copiedValues = an Array[3]
Arguments:
        aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptMessage:with:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        argument = nil
Context PC = 26

----------------------------------------------------------------------
Net.HttpDispatcher>>acceptMessage:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aHttpEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        argument = nil
Context PC = 15

----------------------------------------------------------------------
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Receiver:
        a Net.HttpRequest
Instance Variables:
        source = nil
        parent = nil
        value = 

        header = Connection: Keep-Alive

Host: yahoo.com

        headerCharset = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
        nextNamespaceId = nil
        requestLine = PUT / HTTP/1.1
Arguments:
        aVisitor = a Net.HttpDispatcher
        argument = nil
Context PC = 5

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMessageElement = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aStream = an ExternalReadAppendStream
Context PC = 11

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMimeEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aStream = an ExternalReadAppendStream
Context PC = 6

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeWithConnection:
Receiver:
        a Net.HttpProtocolInterpreter
Instance Variables:
        connection = a Net.HttpConnection
        authPolicy = a Net.AuthenticationPolicy
        cookieAgent = a Net.CookieAgent
        enableCookies = true
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        hostName = 'yahoo.com'
        portNumber = 80
        timeout = 20000
        useProxy = false
        proxyHost = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
Arguments:
        aConnectionStream = an ExternalReadAppendStream
Context PC = 18

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeRequest:
Receiver:
        a Net.HttpProtocolInterpreter
Instance Variables:
        connection = a Net.HttpConnection
        authPolicy = a Net.AuthenticationPolicy
        cookieAgent = a Net.CookieAgent
        enableCookies = true
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        hostName = 'yahoo.com'
        portNumber = 80
        timeout = 20000
        useProxy = false
        proxyHost = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
Arguments:
        aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 18

----------------------------------------------------------------------
Net.HttpClient>>privateExecuteRequest
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequestDo:
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Arguments:
        aBlock = nil
Temporaries:
        streamx = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpClient>>executeAndGetResponse
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequest:
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Arguments:
        aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 7

----------------------------------------------------------------------
optimized [] in Net.HttpRequest>>execute
Receiver:
        an UndefinedObject
Temporaries:
        .client = aHttpClient on: yahoo.com:80
        .self = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 6

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.HttpRequest>>execute
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Net.HttpRequest>>execute
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpRequest>>execute
Receiver:
        a Net.HttpRequest
Instance Variables:
        source = nil
        parent = nil
        value = 

        header = Connection: Keep-Alive

Host: yahoo.com

        headerCharset = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
        nextNamespaceId = nil
        requestLine = PUT / HTTP/1.1
Temporaries:
        client = aHttpClient on: yahoo.com:80
Context PC = 16

----------------------------------------------------------------------
UndefinedObject>>unboundMethod
Receiver:
        an UndefinedObject
Context PC = 27

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:arguments:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod
        args = an Array[0]
Context PC = 5

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 5

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1]
Arguments:
        aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
Temporaries:
        context = nil
Context PC = 13

----------------------------------------------------------------------
optimized [] in TextEditorController>>evaluateSelection
Receiver:
        an UndefinedObject
Temporaries:
        .self = a HighlightingTextEditorController
        .code = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 7

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in TextEditorController>>evaluateSelection
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Cursor>>showWhile:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Cursor>>showWhile:
Receiver:
        a Cursor
Instance Variables:
        errorCode = nil
        handle = a ByteArray[4]
        image = Depth1Image(extent: 16 @ 16 depth: 1)
        mask = Depth1Image(extent: 16 @ 16 depth: 1)
        hotSpot = 1 @ 1
        name = 'xeq'
Arguments:
        aBlock = BlockClosure [] in TextEditorController>>evaluateSelection
Temporaries:
        oldcursor = Cursor normal
Context PC = 23

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1]
Temporaries:
        code = AnnotatedMethod UndefinedObject>>unboundMethod
        result = nil
Context PC = 14

----------------------------------------------------------------------
optimized [] in TextEditorController>>doIt
Receiver:
        an UndefinedObject
Temporaries:
        .self = a HighlightingTextEditorController
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in TextEditorController>>doIt
        outerContext = nil
        copiedValues = a HighlightingTextEditorController
Arguments:
        anExceptionSelector = CompilationError
        handlerBlock = BlockClosure [] in TextEditorController>>doIt
Context PC = 18

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>doIt
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1]
Context PC = 20

----------------------------------------------------------------------
WorkspacePage>>doIt
Receiver:
        a WorkspacePage
Instance Variables:
        dependents = a PluggableAdaptor
        builder = an UIBuilder
        uiSession = nil
        eventHandlers = nil
        workspace = a Workbook
        label = 'AWS.ws'
        verboseLabel = nil
        filename = a PortableFilename('AWS.ws')
        fileTimestamp = December 10, 2013 2:46:42 PM
        textModel = a PluggableAdaptor
        unacceptedText = nil
        savedSelection = an Array[2]
        savedFileTimestamp = December 10, 2013 2:46:42 PM
        textModelOverride = nil
Context PC = 16

----------------------------------------------------------------------
Workbook(AbstractWorkspace)>>smalltalkDoIt
Receiver:
        a Workbook
Instance Variables:
        dependents = a ScheduledWindow 32076224
        builder = an UIBuilder
        uiSession = a ControlManager
        eventHandlers = nil
        locals = a WorkspaceVariablePool[7]
        importAll = true
        specificImports = an Array[3]
        importSummaryHolder = a ValueHolder on: 'All'
        pageExplanationHolder = a ValueHolder on: 'AWS.ws'
        statusBarVisible = true
        encodingChannel = a ValueHolder on: #Source
        menuBarHolder = a ValueHolder on: a Menu
        pageHolder = a SelectionInList
        lastInstalledPage = a WorkspacePage
Context PC = 5

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSymbol:
Receiver:
        a MenuBarButtonController
Instance Variables:
        model = nil
        view = a MacOSXMenuBarButtonView
Arguments:
        menuSelection = #smalltalkDoIt
Context PC = 38

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSelection:
Receiver:
        a MenuBarButtonController
Instance Variables:
        model = nil
        view = a MacOSXMenuBarButtonView
Arguments:
        menuSelection = #smalltalkDoIt
Context PC = 17

----------------------------------------------------------------------
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a MacOSXMenuBarButtonView
        .theValue = #smalltalkDoIt
Context PC = 12

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a MacOSXMenuBarButtonView
        .theValue = #smalltalkDoIt
Context PC = 14

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = VetoAction
        handlerBlock = BlockClosure [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Context PC = 18

----------------------------------------------------------------------
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        a MacOSXMenuBarButtonView
Instance Variables:
        container = a BoundedWrapper on: a MacOSXMenuBarButtonView
        eventHandlers = nil
        properties = nil
        model = nil
        controller = a MenuBarButtonController
        state = a WidgetState
        isInTransition = true
        latestValue = nil
        referenceValue = true
        label = Label for 'Smalltalk'
        textStyle = a VariableSizeTextAttributes
        menuHolder = a Menu
        menuBar = a MacOSXMenuBar
Arguments:
        aKeyboardEvent = a PrefocusKeypressEvent
Temporaries:
        theMenu = a Menu
        matchingMenuItem = a MenuItem 'Do it'
        theValue = #smalltalkDoIt
        selector = nil
Context PC = 55

----------------------------------------------------------------------
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
        a MacOSXMenuBar
Instance Variables:
        container = a MenuBarWrapper on: a MacOSXMenuBar
        eventHandlers = nil
        properties = nil
        components = an OrderedCollection[5]
        preferredBounds = 0 @ 0 corner: 233 @ 22
        leftSpace = 0
        spaceBetweenItems = 0
        extraSpaceTop = 0
        extraSpaceBottom = 0
        extraSpaceBetweenLines = 0
        menuChannel = a ValueHolder on: a Menu
        performer = a Workbook
        menuButtons = an OrderedCollection[5]
        nextMenuButton = nil
Arguments:
        each = a MacOSXMenuBarButtonView
Temporaries:
        .aKeypressEvent = a PrefocusKeypressEvent
Context PC = 10

----------------------------------------------------------------------
OrderedCollection>>do:
Receiver:
        an OrderedCollection
Instance Variables:
        firstIndex = 1
        lastIndex = 5
Arguments:
        aBlock = BlockClosure [] in MenuBar>>prefocusKeypressEvent:
Temporaries:
        index = 3
Context PC = 17

----------------------------------------------------------------------
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
        a MacOSXMenuBar
Instance Variables:
        container = a MenuBarWrapper on: a MacOSXMenuBar
        eventHandlers = nil
        properties = nil
        components = an OrderedCollection[5]
        preferredBounds = 0 @ 0 corner: 233 @ 22
        leftSpace = 0
        spaceBetweenItems = 0
        extraSpaceTop = 0
        extraSpaceBottom = 0
        extraSpaceBetweenLines = 0
        menuChannel = a ValueHolder on: a Menu
        performer = a Workbook
        menuButtons = an OrderedCollection[5]
        nextMenuButton = nil
Arguments:
        aKeypressEvent = a PrefocusKeypressEvent
Context PC = 44

----------------------------------------------------------------------
PrefocusKeypressEvent>>dispatchTo:
Receiver:
        a PrefocusKeypressEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
        wasHandled = nil
Arguments:
        anObject = a MacOSXMenuBar
Context PC = 4

----------------------------------------------------------------------
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        aKeyEvent = a KeyPressedEvent
Temporaries:
        prefocus = a PrefocusKeypressEvent
Context PC = 17

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        aKeyboardEvent = a KeyPressedEvent
Context PC = 5

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:for:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        keyboardEvent = a KeyPressedEvent
        aController = an ApplicationStandardSystemController
Temporaries:
        ev = a KeyPressedEvent
Context PC = 26

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
        an EventDispatcher
Instance Variables:
        windowController = an ApplicationStandardSystemController
        currentMouseConsumer = nil
        grabbingMouse = false
        lastControlObject = nil
        trapList = nil
        state = nil
        repairDamageWhenDebugging = true
        flushQueueAfterError = true
        distributeEventsWhenDebugging = true
        dragDropInProgress = false
        dragDropTracker = nil
        dispatchUnknownEvents = false
Arguments:
        event = a KeyPressedEvent
Temporaries:
        objectWantingControl = nil
        targetKeyboardProcessor = a KeyboardProcessor
Context PC = 99

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatch
Receiver:
        a KeyPressedEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
Context PC = 16

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
        a KeyPressedEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
Arguments:
        aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
        an UndefinedObject
Temporaries:
        .event = a KeyPressedEvent
        .self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = BadControllerError
        handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[3]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
        dontFilterEvents = false
Arguments:
        event = a KeyPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[3]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
        dontFilterEvents = false
Temporaries:
        event = a KeyPressedEvent
Context PC = 9

----------------------------------------------------------------------
optimized [] in [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 13

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
Context PC = 18

----------------------------------------------------------------------
optimized [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 15

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18

----------------------------------------------------------------------
optimized [] in Process class>>forBlock:priority:
Receiver:
        an UndefinedObject
Temporaries:
        .aBlock = BlockClosure [] in WindowManager>>newProcess
Context PC = 9


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Help sending binary data with HTTP put

Boris Popov, DeepCove Labs (SNN)
David,

This is a snippet from our S3 uploader, hope it helps,

(HttpRequest put: url)
        contentLength: bytes size;
        contentMD5: md5 asBase64String;
        contentType: 'binary/octet-stream';
        contentTransferEncoding: 'base64';
        byteSource: bytes readStream;
        doNotChunk;
        awsSign: key secret: secret;
        yourself.

awsSign: key secret: secret

        | signature hmac |
        self date: Timestamp now.
        signature := String streamContents:
                                        [:ws |
                                        ws
                                                nextPutAll: self method;
                                                nextPut: Character lf;
                                                nextPutAll: (self contentMD5 ifNil: ['']);
                                                nextPut: Character lf;
                                                nextPutAll: (self method = 'GET' ifTrue: [''] ifFalse: [self contentType]);
                                                nextPut: Character lf;
                                                nextPutAll: (RFC822Scanner dateStringFrom: self date);
                                                nextPut: Character lf;
                                                nextPutAll: self requestLine pathString].
        hmac := Security.HMAC hash: Security.SHA new.
        hmac setKey: secret asByteArray.
        hmac updateWith: signature asByteArray.
        self authorization: (String streamContents: [:ws |
                                                ws
                                                        nextPutAll: 'AWS';
                                                        space;
                                                        nextPutAll: key;
                                                        nextPut: $:;
                                                        nextPutAll: (WebServices.BindingBuilder encodeBase64: hmac digest)]).

-Boris

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Shaffer
Sent: December 11, 2013 8:58 PM
To: VWNC
Subject: [vwnc] Help sending binary data with HTTP put

I'm getting a walkback:

"Actually putting to AWS/S3 via Cloudfork but this code snippet demonstrates problem"
request := Net.HttpRequest put: 'http://yahoo.com'.
request
        body: (Net.SimpleBody new source: #[1 2 3] readStream);
        contentLength: 3;
        shouldChunk: false.
request execute

If I execute this request I get the walkback (in vw7.9) pasted below.  I'm sure that I'm missing something simple...just can't seem to find it in NetClientDevGuide.  Any pointers would be appreciated.

David

Unhandled exception: No character available for character value 1
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
ByteStreamEncoder>>write:on:
EncodedStream>>nextPut:
Net.SimpleBody>>byteValueAsStream
Net.SimpleBody>>writeOn:
Net.HttpWriteHandler>>startSimpleBody:
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Net.SimpleBody>>acceptVisit:with:
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Net.HttpDispatcher>>acceptMessage:with:
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Net.HttpProtocolInterpreter>>executeWithConnection:
Net.HttpProtocolInterpreter>>executeRequest:
Net.HttpClient>>privateExecuteRequest
Net.HttpClient>>executeRequestDo:
Net.HttpClient>>executeAndGetResponse
Net.HttpClient>>executeRequest:
optimized [] in Net.HttpRequest>>execute
BlockClosure>>ensure:
Net.HttpRequest>>execute
UndefinedObject>>unboundMethod
UndefinedObject(Object)>>performMethod:arguments:
UndefinedObject(Object)>>performMethod:
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
optimized [] in TextEditorController>>evaluateSelection
BlockClosure>>ensure:
Cursor>>showWhile:
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
optimized [] in TextEditorController>>doIt
BlockClosure>>on:do:
HighlightingTextEditorController(TextEditorController)>>doIt
WorkspacePage>>doIt
Workbook(AbstractWorkspace)>>smalltalkDoIt
MenuBarButtonController>>dispatchMenuSymbol:
MenuBarButtonController>>dispatchMenuSelection:
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>ensure:
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>on:do:
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
OrderedCollection>>do:
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
PrefocusKeypressEvent>>dispatchTo:
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:for:
EventDispatcher>>dispatchEvent:
KeyPressedEvent(Event)>>dispatch
KeyPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
Receiver:
        an IllegalCharacterStreamErrorPolicy
Instance Variables:
        streamEncoder = nil
Arguments:
        aCharacter = 1
        aStream = a ReadWriteStream
Context PC = 26

----------------------------------------------------------------------
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
Receiver:
        a ByteStreamEncoder
Instance Variables:
        encoder = a ByteCharacterEncoder
        errorPolicy = an IllegalCharacterStreamErrorPolicy
        skipRecord = a PositionRecord
Arguments:
        aCharacter = 1
        aStream = a ReadWriteStream
Context PC = 7

----------------------------------------------------------------------
ByteStreamEncoder>>write:on:
Receiver:
        a ByteStreamEncoder
Instance Variables:
        encoder = a ByteCharacterEncoder
        errorPolicy = an IllegalCharacterStreamErrorPolicy
        skipRecord = a PositionRecord
Arguments:
        c = 1
        aStream = a ReadWriteStream
Temporaries:
        code = 65535
Context PC = 15

----------------------------------------------------------------------
EncodedStream>>nextPut:
Receiver:
        an EncodedStream
Instance Variables:
        binary = false
        stream = a ReadWriteStream
        encoder = a ByteStreamEncoder
        policy = nil
        lineEndConvention = 4
        lineEndCharacter = nil
        skipSize = a PositionRecord
Arguments:
        anObject = 1
Context PC = 19

----------------------------------------------------------------------
Net.SimpleBody>>byteValueAsStream
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Temporaries:
        stream = an EncodedStream on a ReadWriteStream with a ByteStreamEncoder
        encoding = 'us-ascii'
Context PC = 103

----------------------------------------------------------------------
Net.SimpleBody>>writeOn:
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Arguments:
        aStream = an ExternalReadAppendStream
Temporaries:
        input = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpWriteHandler>>startSimpleBody:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aSimpleBody = 

Context PC = 6

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a Net.HttpDispatcher
        .aSimpleBody = 

Context PC = 8

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.MimeDispatcher>>acceptSimpleBody:with:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aSimpleBody = 

        argument = nil
Context PC = 20

----------------------------------------------------------------------
Net.SimpleBody>>acceptVisit:with:
Receiver:
        a Net.SimpleBody
Instance Variables:
        source = a ReadStream
        parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        value = nil
        byteSource = nil
Arguments:
        aVisitor = a Net.HttpDispatcher
        argument = nil
Context PC = 5

----------------------------------------------------------------------
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
        an UndefinedObject
Temporaries:
        .aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        .self = a Net.HttpDispatcher
        .argument = nil
Context PC = 8

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aBlock = BlockClosure [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Context PC = 3

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
        an UndefinedObject
Temporaries:
        .aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        .self = a Net.HttpDispatcher
        .argument = nil
Context PC = 32

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.MimeDispatcher>>acceptMessage:with:
        outerContext = nil
        copiedValues = an Array[3]
Arguments:
        aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptMessage:with:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        argument = nil
Context PC = 26

----------------------------------------------------------------------
Net.HttpDispatcher>>acceptMessage:with:
Receiver:
        a Net.HttpDispatcher
Instance Variables:
        handler = a Net.HttpWriteHandler
Arguments:
        aHttpEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        argument = nil
Context PC = 15

----------------------------------------------------------------------
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Receiver:
        a Net.HttpRequest
Instance Variables:
        source = nil
        parent = nil
        value = 

        header = Connection: Keep-Alive

Host: yahoo.com

        headerCharset = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
        nextNamespaceId = nil
        requestLine = PUT / HTTP/1.1
Arguments:
        aVisitor = a Net.HttpDispatcher
        argument = nil
Context PC = 5

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMessageElement = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aStream = an ExternalReadAppendStream
Context PC = 11

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Receiver:
        a Net.HttpWriteHandler
Instance Variables:
        dispatcher = a Net.HttpDispatcher
        options = a Net.HttpWritingOptions
        streams = an OrderedCollection[1]
        fieldStream = a WriteStream
        originalStream = an ExternalReadAppendStream
        binaryMode = false
Arguments:
        aMimeEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        aStream = an ExternalReadAppendStream
Context PC = 6

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeWithConnection:
Receiver:
        a Net.HttpProtocolInterpreter
Instance Variables:
        connection = a Net.HttpConnection
        authPolicy = a Net.AuthenticationPolicy
        cookieAgent = a Net.CookieAgent
        enableCookies = true
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        hostName = 'yahoo.com'
        portNumber = 80
        timeout = 20000
        useProxy = false
        proxyHost = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
Arguments:
        aConnectionStream = an ExternalReadAppendStream Context PC = 18

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeRequest:
Receiver:
        a Net.HttpProtocolInterpreter
Instance Variables:
        connection = a Net.HttpConnection
        authPolicy = a Net.AuthenticationPolicy
        cookieAgent = a Net.CookieAgent
        enableCookies = true
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        hostName = 'yahoo.com'
        portNumber = 80
        timeout = 20000
        useProxy = false
        proxyHost = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
Arguments:
        aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 18

----------------------------------------------------------------------
Net.HttpClient>>privateExecuteRequest
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequestDo:
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Arguments:
        aBlock = nil
Temporaries:
        streamx = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpClient>>executeAndGetResponse
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequest:
Receiver:
        a Net.HttpClient
Instance Variables:
        user = nil
        hostName = nil
        portNumber = nil
        clientPI = a Net.HttpProtocolInterpreter
        retries = nil
        timeout = nil
        delaySeconds = nil
        state = nil
        request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



        keepAlive = true
        protocol = nil
Arguments:
        aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 7

----------------------------------------------------------------------
optimized [] in Net.HttpRequest>>execute
Receiver:
        an UndefinedObject
Temporaries:
        .client = aHttpClient on: yahoo.com:80
        .self = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 6

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in Net.HttpRequest>>execute
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Net.HttpRequest>>execute
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpRequest>>execute
Receiver:
        a Net.HttpRequest
Instance Variables:
        source = nil
        parent = nil
        value = 

        header = Connection: Keep-Alive

Host: yahoo.com

        headerCharset = nil
        readingOptions = a Net.HttpReadingOptions
        writingOptions = a Net.HttpWritingOptions
        nextNamespaceId = nil
        requestLine = PUT / HTTP/1.1
Temporaries:
        client = aHttpClient on: yahoo.com:80
Context PC = 16

----------------------------------------------------------------------
UndefinedObject>>unboundMethod
Receiver:
        an UndefinedObject
Context PC = 27

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:arguments:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod
        args = an Array[0]
Context PC = 5

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod Context PC = 5

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1]
Arguments:
        aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
Temporaries:
        context = nil
Context PC = 13

----------------------------------------------------------------------
optimized [] in TextEditorController>>evaluateSelection
Receiver:
        an UndefinedObject
Temporaries:
        .self = a HighlightingTextEditorController
        .code = AnnotatedMethod UndefinedObject>>unboundMethod Context PC = 7

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in TextEditorController>>evaluateSelection
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Cursor>>showWhile:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Cursor>>showWhile:
Receiver:
        a Cursor
Instance Variables:
        errorCode = nil
        handle = a ByteArray[4]
        image = Depth1Image(extent: 16 @ 16 depth: 1)
        mask = Depth1Image(extent: 16 @ 16 depth: 1)
        hotSpot = 1 @ 1
        name = 'xeq'
Arguments:
        aBlock = BlockClosure [] in TextEditorController>>evaluateSelection
Temporaries:
        oldcursor = Cursor normal
Context PC = 23

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1]
Temporaries:
        code = AnnotatedMethod UndefinedObject>>unboundMethod
        result = nil
Context PC = 14

----------------------------------------------------------------------
optimized [] in TextEditorController>>doIt
Receiver:
        an UndefinedObject
Temporaries:
        .self = a HighlightingTextEditorController Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in TextEditorController>>doIt
        outerContext = nil
        copiedValues = a HighlightingTextEditorController
Arguments:
        anExceptionSelector = CompilationError
        handlerBlock = BlockClosure [] in TextEditorController>>doIt Context PC = 18

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>doIt
Receiver:
        a HighlightingTextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1196
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = true
        feelPolicy = a MotifFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[20]
        extendingDown = true
        keyboardHook = nil
        readOnly = false
        accepted = false
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
        selectable = false
        maxChars = nil
        nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
        currentUndo = a TextUndo #Typing [+] readStream[+]
        highlightingProcess = a Process in nil
        highlighters = an IdentityDictionary[1] Context PC = 20

----------------------------------------------------------------------
WorkspacePage>>doIt
Receiver:
        a WorkspacePage
Instance Variables:
        dependents = a PluggableAdaptor
        builder = an UIBuilder
        uiSession = nil
        eventHandlers = nil
        workspace = a Workbook
        label = 'AWS.ws'
        verboseLabel = nil
        filename = a PortableFilename('AWS.ws')
        fileTimestamp = December 10, 2013 2:46:42 PM
        textModel = a PluggableAdaptor
        unacceptedText = nil
        savedSelection = an Array[2]
        savedFileTimestamp = December 10, 2013 2:46:42 PM
        textModelOverride = nil
Context PC = 16

----------------------------------------------------------------------
Workbook(AbstractWorkspace)>>smalltalkDoIt
Receiver:
        a Workbook
Instance Variables:
        dependents = a ScheduledWindow 32076224
        builder = an UIBuilder
        uiSession = a ControlManager
        eventHandlers = nil
        locals = a WorkspaceVariablePool[7]
        importAll = true
        specificImports = an Array[3]
        importSummaryHolder = a ValueHolder on: 'All'
        pageExplanationHolder = a ValueHolder on: 'AWS.ws'
        statusBarVisible = true
        encodingChannel = a ValueHolder on: #Source
        menuBarHolder = a ValueHolder on: a Menu
        pageHolder = a SelectionInList
        lastInstalledPage = a WorkspacePage
Context PC = 5

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSymbol:
Receiver:
        a MenuBarButtonController
Instance Variables:
        model = nil
        view = a MacOSXMenuBarButtonView
Arguments:
        menuSelection = #smalltalkDoIt
Context PC = 38

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSelection:
Receiver:
        a MenuBarButtonController
Instance Variables:
        model = nil
        view = a MacOSXMenuBarButtonView
Arguments:
        menuSelection = #smalltalkDoIt
Context PC = 17

----------------------------------------------------------------------
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a MacOSXMenuBarButtonView
        .theValue = #smalltalkDoIt
Context PC = 12

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        an UndefinedObject
Temporaries:
        .self = a MacOSXMenuBarButtonView
        .theValue = #smalltalkDoIt
Context PC = 14

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = VetoAction
        handlerBlock = BlockClosure [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Context PC = 18

----------------------------------------------------------------------
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
        a MacOSXMenuBarButtonView
Instance Variables:
        container = a BoundedWrapper on: a MacOSXMenuBarButtonView
        eventHandlers = nil
        properties = nil
        model = nil
        controller = a MenuBarButtonController
        state = a WidgetState
        isInTransition = true
        latestValue = nil
        referenceValue = true
        label = Label for 'Smalltalk'
        textStyle = a VariableSizeTextAttributes
        menuHolder = a Menu
        menuBar = a MacOSXMenuBar
Arguments:
        aKeyboardEvent = a PrefocusKeypressEvent
Temporaries:
        theMenu = a Menu
        matchingMenuItem = a MenuItem 'Do it'
        theValue = #smalltalkDoIt
        selector = nil
Context PC = 55

----------------------------------------------------------------------
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
        a MacOSXMenuBar
Instance Variables:
        container = a MenuBarWrapper on: a MacOSXMenuBar
        eventHandlers = nil
        properties = nil
        components = an OrderedCollection[5]
        preferredBounds = 0 @ 0 corner: 233 @ 22
        leftSpace = 0
        spaceBetweenItems = 0
        extraSpaceTop = 0
        extraSpaceBottom = 0
        extraSpaceBetweenLines = 0
        menuChannel = a ValueHolder on: a Menu
        performer = a Workbook
        menuButtons = an OrderedCollection[5]
        nextMenuButton = nil
Arguments:
        each = a MacOSXMenuBarButtonView
Temporaries:
        .aKeypressEvent = a PrefocusKeypressEvent Context PC = 10

----------------------------------------------------------------------
OrderedCollection>>do:
Receiver:
        an OrderedCollection
Instance Variables:
        firstIndex = 1
        lastIndex = 5
Arguments:
        aBlock = BlockClosure [] in MenuBar>>prefocusKeypressEvent:
Temporaries:
        index = 3
Context PC = 17

----------------------------------------------------------------------
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
        a MacOSXMenuBar
Instance Variables:
        container = a MenuBarWrapper on: a MacOSXMenuBar
        eventHandlers = nil
        properties = nil
        components = an OrderedCollection[5]
        preferredBounds = 0 @ 0 corner: 233 @ 22
        leftSpace = 0
        spaceBetweenItems = 0
        extraSpaceTop = 0
        extraSpaceBottom = 0
        extraSpaceBetweenLines = 0
        menuChannel = a ValueHolder on: a Menu
        performer = a Workbook
        menuButtons = an OrderedCollection[5]
        nextMenuButton = nil
Arguments:
        aKeypressEvent = a PrefocusKeypressEvent Context PC = 44

----------------------------------------------------------------------
PrefocusKeypressEvent>>dispatchTo:
Receiver:
        a PrefocusKeypressEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
        wasHandled = nil
Arguments:
        anObject = a MacOSXMenuBar
Context PC = 4

----------------------------------------------------------------------
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        aKeyEvent = a KeyPressedEvent
Temporaries:
        prefocus = a PrefocusKeypressEvent
Context PC = 17

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        aKeyboardEvent = a KeyPressedEvent
Context PC = 5

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:for:
Receiver:
        a KeyboardProcessor
Instance Variables:
        keyboardHook = nil
        focusIsShifting = false
        acceptOnControlChange = false
        menuBar = a MacOSXMenuBar
        parentVisual = a ScheduledWindow 32076224
        focusedView = a TextEditorView
Arguments:
        keyboardEvent = a KeyPressedEvent
        aController = an ApplicationStandardSystemController
Temporaries:
        ev = a KeyPressedEvent
Context PC = 26

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
        an EventDispatcher
Instance Variables:
        windowController = an ApplicationStandardSystemController
        currentMouseConsumer = nil
        grabbingMouse = false
        lastControlObject = nil
        trapList = nil
        state = nil
        repairDamageWhenDebugging = true
        flushQueueAfterError = true
        distributeEventsWhenDebugging = true
        dragDropInProgress = false
        dragDropTracker = nil
        dispatchUnknownEvents = false
Arguments:
        event = a KeyPressedEvent
Temporaries:
        objectWantingControl = nil
        targetKeyboardProcessor = a KeyboardProcessor Context PC = 99

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatch
Receiver:
        a KeyPressedEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
Context PC = 16

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
        a KeyPressedEvent
Instance Variables:
        time = nil
        initiator = an EventDispatcher
        window = a ScheduledWindow 32076224
        state = nil
        keyCharacter = $ "16r0004"
        metaState = 2
        alternativeKeyCharacter = nil
Arguments:
        aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
        an UndefinedObject
Temporaries:
        .event = a KeyPressedEvent
        .self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = BadControllerError
        handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[3]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
        dontFilterEvents = false
Arguments:
        event = a KeyPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[3]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
        dontFilterEvents = false
Temporaries:
        event = a KeyPressedEvent
Context PC = 9

----------------------------------------------------------------------
optimized [] in [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 13

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess Context PC = 18

----------------------------------------------------------------------
optimized [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 15

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18

----------------------------------------------------------------------
optimized [] in Process class>>forBlock:priority:
Receiver:
        an UndefinedObject
Temporaries:
        .aBlock = BlockClosure [] in WindowManager>>newProcess Context PC = 9


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Help sending binary data with HTTP put

mkobetic
In reply to this post by cdavidshaffer
Just this should work:

(Net.HttpRequest put: 'http://yahoo.com')
        contents: #[1 2 3];
        yourself

This is what it should send:

PUT / HTTP/1.1
Host: yahoo.com
Content-type: application/octet-stream

------ (3 bytes) -----

You can specify the contents as a read stream as well, but then the framework will want to chunk because streams in general don't know their size. If the content comes from a file, then you can give just the Filename and then it should send without chunking.

In general the framework wants to manage the contentLength: itself (it may change when different transfer encodings are applied, e.g. compression) so it's best to avoid interfering with that if possible. Your example below may work if you specify binary content type, e.g: 'application/octet-stream'. As it is, it seems to expect character content.

If you haven't yet, I'd recommended checking out the Net Clients section in doc/ReleaseNotes7.7.pdf

HTH,

Martin


"David Shaffer"<[hidden email]> wrote:

> Date: December 11, 2013 8:57:32 PM
> From: David Shaffer <[hidden email]>
> To: VWNC<[hidden email]>
> Subject: [vwnc] Help sending binary data with HTTP put
>
> I'm getting a walkback:
>
> "Actually putting to AWS/S3 via Cloudfork but this code snippet demonstrates problem"
> request := Net.HttpRequest put: 'http://yahoo.com'.
> request
> body: (Net.SimpleBody new source: #[1 2 3] readStream);
> contentLength: 3;
> shouldChunk: false.
> request execute
>
> If I execute this request I get the walkback (in vw7.9) pasted below.  I'm sure that I'm missing something simple...just can't seem to find it in NetClientDevGuide.  Any pointers would be appreciated.
>
> David
>
> Unhandled exception: No character available for character value 1
> IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
> ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
> ByteStreamEncoder>>write:on:
> EncodedStream>>nextPut:
> Net.SimpleBody>>byteValueAsStream
> Net.SimpleBody>>writeOn:
> Net.HttpWriteHandler>>startSimpleBody:
> optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
> BlockClosure>>ensure:
> Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
> Net.SimpleBody>>acceptVisit:with:
> optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
> Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
> optimized [] in Net.MimeDispatcher>>acceptMessage:with:
> BlockClosure>>ensure:
> Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
> Net.HttpDispatcher>>acceptMessage:with:
> Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
> Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
> Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
> Net.HttpProtocolInterpreter>>executeWithConnection:
> Net.HttpProtocolInterpreter>>executeRequest:
> Net.HttpClient>>privateExecuteRequest
> Net.HttpClient>>executeRequestDo:
> Net.HttpClient>>executeAndGetResponse
> Net.HttpClient>>executeRequest:
> optimized [] in Net.HttpRequest>>execute
> BlockClosure>>ensure:
> Net.HttpRequest>>execute
> UndefinedObject>>unboundMethod
> UndefinedObject(Object)>>performMethod:arguments:
> UndefinedObject(Object)>>performMethod:
> HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
> optimized [] in TextEditorController>>evaluateSelection
> BlockClosure>>ensure:
> Cursor>>showWhile:
> HighlightingTextEditorController(TextEditorController)>>evaluateSelection
> optimized [] in TextEditorController>>doIt
> BlockClosure>>on:do:
> HighlightingTextEditorController(TextEditorController)>>doIt
> WorkspacePage>>doIt
> Workbook(AbstractWorkspace)>>smalltalkDoIt
> MenuBarButtonController>>dispatchMenuSymbol:
> MenuBarButtonController>>dispatchMenuSelection:
> optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> BlockClosure>>ensure:
> optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> BlockClosure>>on:do:
> MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
> [] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
> OrderedCollection>>do:
> MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
> PrefocusKeypressEvent>>dispatchTo:
> KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
> KeyboardProcessor>>processKeyboardEvent:
> KeyboardProcessor>>processKeyboardEvent:for:
> EventDispatcher>>dispatchEvent:
> KeyPressedEvent(Event)>>dispatch
> KeyPressedEvent(Event)>>dispatchForWindowManager:
> optimized [] in WindowManager>>safelyDispatchForWindowManager:
> BlockClosure>>on:do:
> WindowManager>>safelyDispatchForWindowManager:
> WindowManager>>processNextEvent
> optimized [] in [] in WindowManager>>newProcess
> BlockClosure>>on:do:
> optimized [] in WindowManager>>newProcess
> BlockClosure>>on:do:
> optimized [] in Process class>>forBlock:priority:
>
> ----------------------------------------------------------------------
> IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
> Receiver:
> an IllegalCharacterStreamErrorPolicy
> Instance Variables:
> streamEncoder = nil
> Arguments:
> aCharacter = 1
> aStream = a ReadWriteStream
> Context PC = 26
>
> ----------------------------------------------------------------------
> ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
> Receiver:
> a ByteStreamEncoder
> Instance Variables:
> encoder = a ByteCharacterEncoder
> errorPolicy = an IllegalCharacterStreamErrorPolicy
> skipRecord = a PositionRecord
> Arguments:
> aCharacter = 1
> aStream = a ReadWriteStream
> Context PC = 7
>
> ----------------------------------------------------------------------
> ByteStreamEncoder>>write:on:
> Receiver:
> a ByteStreamEncoder
> Instance Variables:
> encoder = a ByteCharacterEncoder
> errorPolicy = an IllegalCharacterStreamErrorPolicy
> skipRecord = a PositionRecord
> Arguments:
> c = 1
> aStream = a ReadWriteStream
> Temporaries:
> code = 65535
> Context PC = 15
>
> ----------------------------------------------------------------------
> EncodedStream>>nextPut:
> Receiver:
> an EncodedStream
> Instance Variables:
> binary = false
> stream = a ReadWriteStream
> encoder = a ByteStreamEncoder
> policy = nil
> lineEndConvention = 4
> lineEndCharacter = nil
> skipSize = a PositionRecord
> Arguments:
> anObject = 1
> Context PC = 19
>
> ----------------------------------------------------------------------
> Net.SimpleBody>>byteValueAsStream
> Receiver:
> a Net.SimpleBody
> Instance Variables:
> source = a ReadStream
> parent = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> value = nil
> byteSource = nil
> Temporaries:
> stream = an EncodedStream on a ReadWriteStream with a ByteStreamEncoder
> encoding = 'us-ascii'
> Context PC = 103
>
> ----------------------------------------------------------------------
> Net.SimpleBody>>writeOn:
> Receiver:
> a Net.SimpleBody
> Instance Variables:
> source = a ReadStream
> parent = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> value = nil
> byteSource = nil
> Arguments:
> aStream = an ExternalReadAppendStream
> Temporaries:
> input = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Net.HttpWriteHandler>>startSimpleBody:
> Receiver:
> a Net.HttpWriteHandler
> Instance Variables:
> dispatcher = a Net.HttpDispatcher
> options = a Net.HttpWritingOptions
> streams = an OrderedCollection[1]
> fieldStream = a WriteStream
> originalStream = an ExternalReadAppendStream
> binaryMode = false
> Arguments:
> aSimpleBody = 
>
> Context PC = 6
>
> ----------------------------------------------------------------------
> optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a Net.HttpDispatcher
> .aSimpleBody = 
>
> Context PC = 8
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in Net.MimeDispatcher>>acceptSimpleBody:with:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptSimpleBody:with:
> Temporaries:
> result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
> Receiver:
> a Net.HttpDispatcher
> Instance Variables:
> handler = a Net.HttpWriteHandler
> Arguments:
> aSimpleBody = 
>
> argument = nil
> Context PC = 20
>
> ----------------------------------------------------------------------
> Net.SimpleBody>>acceptVisit:with:
> Receiver:
> a Net.SimpleBody
> Instance Variables:
> source = a ReadStream
> parent = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> value = nil
> byteSource = nil
> Arguments:
> aVisitor = a Net.HttpDispatcher
> argument = nil
> Context PC = 5
>
> ----------------------------------------------------------------------
> optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
> Receiver:
> an UndefinedObject
> Temporaries:
> .aMessage = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> .self = a Net.HttpDispatcher
> .argument = nil
> Context PC = 8
>
> ----------------------------------------------------------------------
> Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
> Receiver:
> a Net.HttpWriteHandler
> Instance Variables:
> dispatcher = a Net.HttpDispatcher
> options = a Net.HttpWritingOptions
> streams = an OrderedCollection[1]
> fieldStream = a WriteStream
> originalStream = an ExternalReadAppendStream
> binaryMode = false
> Arguments:
> aMessage = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> aBlock = BlockClosure [] in [] in Net.MimeDispatcher>>acceptMessage:with:
> Context PC = 3
>
> ----------------------------------------------------------------------
> optimized [] in Net.MimeDispatcher>>acceptMessage:with:
> Receiver:
> an UndefinedObject
> Temporaries:
> .aMessage = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> .self = a Net.HttpDispatcher
> .argument = nil
> Context PC = 32
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in Net.MimeDispatcher>>acceptMessage:with:
> outerContext = nil
> copiedValues = an Array[3]
> Arguments:
> aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptMessage:with:
> Temporaries:
> result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
> Receiver:
> a Net.HttpDispatcher
> Instance Variables:
> handler = a Net.HttpWriteHandler
> Arguments:
> aMessage = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> argument = nil
> Context PC = 26
>
> ----------------------------------------------------------------------
> Net.HttpDispatcher>>acceptMessage:with:
> Receiver:
> a Net.HttpDispatcher
> Instance Variables:
> handler = a Net.HttpWriteHandler
> Arguments:
> aHttpEntity = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> argument = nil
> Context PC = 15
>
> ----------------------------------------------------------------------
> Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
> Receiver:
> a Net.HttpRequest
> Instance Variables:
> source = nil
> parent = nil
> value = 
>
> header = Connection: Keep-Alive
>
> Host: yahoo.com
>
> headerCharset = nil
> readingOptions = a Net.HttpReadingOptions
> writingOptions = a Net.HttpWritingOptions
> nextNamespaceId = nil
> requestLine = PUT / HTTP/1.1
> Arguments:
> aVisitor = a Net.HttpDispatcher
> argument = nil
> Context PC = 5
>
> ----------------------------------------------------------------------
> Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
> Receiver:
> a Net.HttpWriteHandler
> Instance Variables:
> dispatcher = a Net.HttpDispatcher
> options = a Net.HttpWritingOptions
> streams = an OrderedCollection[1]
> fieldStream = a WriteStream
> originalStream = an ExternalReadAppendStream
> binaryMode = false
> Arguments:
> aMessageElement = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> aStream = an ExternalReadAppendStream
> Context PC = 11
>
> ----------------------------------------------------------------------
> Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
> Receiver:
> a Net.HttpWriteHandler
> Instance Variables:
> dispatcher = a Net.HttpDispatcher
> options = a Net.HttpWritingOptions
> streams = an OrderedCollection[1]
> fieldStream = a WriteStream
> originalStream = an ExternalReadAppendStream
> binaryMode = false
> Arguments:
> aMimeEntity = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> aStream = an ExternalReadAppendStream
> Context PC = 6
>
> ----------------------------------------------------------------------
> Net.HttpProtocolInterpreter>>executeWithConnection:
> Receiver:
> a Net.HttpProtocolInterpreter
> Instance Variables:
> connection = a Net.HttpConnection
> authPolicy = a Net.AuthenticationPolicy
> cookieAgent = a Net.CookieAgent
> enableCookies = true
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> hostName = 'yahoo.com'
> portNumber = 80
> timeout = 20000
> useProxy = false
> proxyHost = nil
> readingOptions = a Net.HttpReadingOptions
> writingOptions = a Net.HttpWritingOptions
> Arguments:
> aConnectionStream = an ExternalReadAppendStream
> Context PC = 18
>
> ----------------------------------------------------------------------
> Net.HttpProtocolInterpreter>>executeRequest:
> Receiver:
> a Net.HttpProtocolInterpreter
> Instance Variables:
> connection = a Net.HttpConnection
> authPolicy = a Net.AuthenticationPolicy
> cookieAgent = a Net.CookieAgent
> enableCookies = true
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> hostName = 'yahoo.com'
> portNumber = 80
> timeout = 20000
> useProxy = false
> proxyHost = nil
> readingOptions = a Net.HttpReadingOptions
> writingOptions = a Net.HttpWritingOptions
> Arguments:
> aRequest = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> Context PC = 18
>
> ----------------------------------------------------------------------
> Net.HttpClient>>privateExecuteRequest
> Receiver:
> a Net.HttpClient
> Instance Variables:
> user = nil
> hostName = nil
> portNumber = nil
> clientPI = a Net.HttpProtocolInterpreter
> retries = nil
> timeout = nil
> delaySeconds = nil
> state = nil
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> keepAlive = true
> protocol = nil
> Context PC = 11
>
> ----------------------------------------------------------------------
> Net.HttpClient>>executeRequestDo:
> Receiver:
> a Net.HttpClient
> Instance Variables:
> user = nil
> hostName = nil
> portNumber = nil
> clientPI = a Net.HttpProtocolInterpreter
> retries = nil
> timeout = nil
> delaySeconds = nil
> state = nil
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> keepAlive = true
> protocol = nil
> Arguments:
> aBlock = nil
> Temporaries:
> streamx = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Net.HttpClient>>executeAndGetResponse
> Receiver:
> a Net.HttpClient
> Instance Variables:
> user = nil
> hostName = nil
> portNumber = nil
> clientPI = a Net.HttpProtocolInterpreter
> retries = nil
> timeout = nil
> delaySeconds = nil
> state = nil
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> keepAlive = true
> protocol = nil
> Context PC = 11
>
> ----------------------------------------------------------------------
> Net.HttpClient>>executeRequest:
> Receiver:
> a Net.HttpClient
> Instance Variables:
> user = nil
> hostName = nil
> portNumber = nil
> clientPI = a Net.HttpProtocolInterpreter
> retries = nil
> timeout = nil
> delaySeconds = nil
> state = nil
> request = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> keepAlive = true
> protocol = nil
> Arguments:
> aRequest = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> Context PC = 7
>
> ----------------------------------------------------------------------
> optimized [] in Net.HttpRequest>>execute
> Receiver:
> an UndefinedObject
> Temporaries:
> .client = aHttpClient on: yahoo.com:80
> .self = PUT / HTTP/1.1
> Host: yahoo.com
> Connection: Keep-Alive
>
> 
>
> Context PC = 6
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in Net.HttpRequest>>execute
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> aBlock = BlockClosure [] in Net.HttpRequest>>execute
> Temporaries:
> result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Net.HttpRequest>>execute
> Receiver:
> a Net.HttpRequest
> Instance Variables:
> source = nil
> parent = nil
> value = 
>
> header = Connection: Keep-Alive
>
> Host: yahoo.com
>
> headerCharset = nil
> readingOptions = a Net.HttpReadingOptions
> writingOptions = a Net.HttpWritingOptions
> nextNamespaceId = nil
> requestLine = PUT / HTTP/1.1
> Temporaries:
> client = aHttpClient on: yahoo.com:80
> Context PC = 16
>
> ----------------------------------------------------------------------
> UndefinedObject>>unboundMethod
> Receiver:
> an UndefinedObject
> Context PC = 27
>
> ----------------------------------------------------------------------
> UndefinedObject(Object)>>performMethod:arguments:
> Receiver:
> an UndefinedObject
> Arguments:
> method = AnnotatedMethod UndefinedObject>>unboundMethod
> args = an Array[0]
> Context PC = 5
>
> ----------------------------------------------------------------------
> UndefinedObject(Object)>>performMethod:
> Receiver:
> an UndefinedObject
> Arguments:
> method = AnnotatedMethod UndefinedObject>>unboundMethod
> Context PC = 5
>
> ----------------------------------------------------------------------
> HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
> Receiver:
> a HighlightingTextEditorController
> Instance Variables:
> model = a PluggableAdaptor
> view = a TextEditorView
> menuHolder = a ValueHolder on: a Menu
> performer = a WorkspacePage
> beginTypeInIndex = nil
> anchorIndex = 1196
> emphasisHere = nil
> dispatchTable = a DispatchTable
> charComposer = a CharacterComposer
> textHasChanged = true
> feelPolicy = a MotifFeelPolicy
> supportCodeEditingFeels = true
> localMenuItems = an Array[20]
> extendingDown = true
> keyboardHook = nil
> readOnly = false
> accepted = false
> autoAccept = false
> continuousAccept = false
> tabMeansNextField = true
> tabRequiresControl = true
> dispatcher = an UIDispatcher
> selectable = false
> maxChars = nil
> nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
> currentUndo = a TextUndo #Typing [+] readStream[+]
> highlightingProcess = a Process in nil
> highlighters = an IdentityDictionary[1]
> Arguments:
> aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
> Temporaries:
> context = nil
> Context PC = 13
>
> ----------------------------------------------------------------------
> optimized [] in TextEditorController>>evaluateSelection
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a HighlightingTextEditorController
> .code = AnnotatedMethod UndefinedObject>>unboundMethod
> Context PC = 7
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in TextEditorController>>evaluateSelection
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> aBlock = BlockClosure [] in Cursor>>showWhile:
> Temporaries:
> result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Cursor>>showWhile:
> Receiver:
> a Cursor
> Instance Variables:
> errorCode = nil
> handle = a ByteArray[4]
> image = Depth1Image(extent: 16 @ 16 depth: 1)
> mask = Depth1Image(extent: 16 @ 16 depth: 1)
> hotSpot = 1 @ 1
> name = 'xeq'
> Arguments:
> aBlock = BlockClosure [] in TextEditorController>>evaluateSelection
> Temporaries:
> oldcursor = Cursor normal
> Context PC = 23
>
> ----------------------------------------------------------------------
> HighlightingTextEditorController(TextEditorController)>>evaluateSelection
> Receiver:
> a HighlightingTextEditorController
> Instance Variables:
> model = a PluggableAdaptor
> view = a TextEditorView
> menuHolder = a ValueHolder on: a Menu
> performer = a WorkspacePage
> beginTypeInIndex = nil
> anchorIndex = 1196
> emphasisHere = nil
> dispatchTable = a DispatchTable
> charComposer = a CharacterComposer
> textHasChanged = true
> feelPolicy = a MotifFeelPolicy
> supportCodeEditingFeels = true
> localMenuItems = an Array[20]
> extendingDown = true
> keyboardHook = nil
> readOnly = false
> accepted = false
> autoAccept = false
> continuousAccept = false
> tabMeansNextField = true
> tabRequiresControl = true
> dispatcher = an UIDispatcher
> selectable = false
> maxChars = nil
> nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
> currentUndo = a TextUndo #Typing [+] readStream[+]
> highlightingProcess = a Process in nil
> highlighters = an IdentityDictionary[1]
> Temporaries:
> code = AnnotatedMethod UndefinedObject>>unboundMethod
> result = nil
> Context PC = 14
>
> ----------------------------------------------------------------------
> optimized [] in TextEditorController>>doIt
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a HighlightingTextEditorController
> Context PC = 6
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in TextEditorController>>doIt
> outerContext = nil
> copiedValues = a HighlightingTextEditorController
> Arguments:
> anExceptionSelector = CompilationError
> handlerBlock = BlockClosure [] in TextEditorController>>doIt
> Context PC = 18
>
> ----------------------------------------------------------------------
> HighlightingTextEditorController(TextEditorController)>>doIt
> Receiver:
> a HighlightingTextEditorController
> Instance Variables:
> model = a PluggableAdaptor
> view = a TextEditorView
> menuHolder = a ValueHolder on: a Menu
> performer = a WorkspacePage
> beginTypeInIndex = nil
> anchorIndex = 1196
> emphasisHere = nil
> dispatchTable = a DispatchTable
> charComposer = a CharacterComposer
> textHasChanged = true
> feelPolicy = a MotifFeelPolicy
> supportCodeEditingFeels = true
> localMenuItems = an Array[20]
> extendingDown = true
> keyboardHook = nil
> readOnly = false
> accepted = false
> autoAccept = false
> continuousAccept = false
> tabMeansNextField = true
> tabRequiresControl = true
> dispatcher = an UIDispatcher
> selectable = false
> maxChars = nil
> nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
> currentUndo = a TextUndo #Typing [+] readStream[+]
> highlightingProcess = a Process in nil
> highlighters = an IdentityDictionary[1]
> Context PC = 20
>
> ----------------------------------------------------------------------
> WorkspacePage>>doIt
> Receiver:
> a WorkspacePage
> Instance Variables:
> dependents = a PluggableAdaptor
> builder = an UIBuilder
> uiSession = nil
> eventHandlers = nil
> workspace = a Workbook
> label = 'AWS.ws'
> verboseLabel = nil
> filename = a PortableFilename('AWS.ws')
> fileTimestamp = December 10, 2013 2:46:42 PM
> textModel = a PluggableAdaptor
> unacceptedText = nil
> savedSelection = an Array[2]
> savedFileTimestamp = December 10, 2013 2:46:42 PM
> textModelOverride = nil
> Context PC = 16
>
> ----------------------------------------------------------------------
> Workbook(AbstractWorkspace)>>smalltalkDoIt
> Receiver:
> a Workbook
> Instance Variables:
> dependents = a ScheduledWindow 32076224
> builder = an UIBuilder
> uiSession = a ControlManager
> eventHandlers = nil
> locals = a WorkspaceVariablePool[7]
> importAll = true
> specificImports = an Array[3]
> importSummaryHolder = a ValueHolder on: 'All'
> pageExplanationHolder = a ValueHolder on: 'AWS.ws'
> statusBarVisible = true
> encodingChannel = a ValueHolder on: #Source
> menuBarHolder = a ValueHolder on: a Menu
> pageHolder = a SelectionInList
> lastInstalledPage = a WorkspacePage
> Context PC = 5
>
> ----------------------------------------------------------------------
> MenuBarButtonController>>dispatchMenuSymbol:
> Receiver:
> a MenuBarButtonController
> Instance Variables:
> model = nil
> view = a MacOSXMenuBarButtonView
> Arguments:
> menuSelection = #smalltalkDoIt
> Context PC = 38
>
> ----------------------------------------------------------------------
> MenuBarButtonController>>dispatchMenuSelection:
> Receiver:
> a MenuBarButtonController
> Instance Variables:
> model = nil
> view = a MacOSXMenuBarButtonView
> Arguments:
> menuSelection = #smalltalkDoIt
> Context PC = 17
>
> ----------------------------------------------------------------------
> optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a MacOSXMenuBarButtonView
> .theValue = #smalltalkDoIt
> Context PC = 12
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> aBlock = BlockClosure [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> Temporaries:
> result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a MacOSXMenuBarButtonView
> .theValue = #smalltalkDoIt
> Context PC = 14
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> anExceptionSelector = VetoAction
> handlerBlock = BlockClosure [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
> Context PC = 18
>
> ----------------------------------------------------------------------
> MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
> Receiver:
> a MacOSXMenuBarButtonView
> Instance Variables:
> container = a BoundedWrapper on: a MacOSXMenuBarButtonView
> eventHandlers = nil
> properties = nil
> model = nil
> controller = a MenuBarButtonController
> state = a WidgetState
> isInTransition = true
> latestValue = nil
> referenceValue = true
> label = Label for 'Smalltalk'
> textStyle = a VariableSizeTextAttributes
> menuHolder = a Menu
> menuBar = a MacOSXMenuBar
> Arguments:
> aKeyboardEvent = a PrefocusKeypressEvent
> Temporaries:
> theMenu = a Menu
> matchingMenuItem = a MenuItem 'Do it'
> theValue = #smalltalkDoIt
> selector = nil
> Context PC = 55
>
> ----------------------------------------------------------------------
> [] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
> Receiver:
> a MacOSXMenuBar
> Instance Variables:
> container = a MenuBarWrapper on: a MacOSXMenuBar
> eventHandlers = nil
> properties = nil
> components = an OrderedCollection[5]
> preferredBounds = 0 @ 0 corner: 233 @ 22
> leftSpace = 0
> spaceBetweenItems = 0
> extraSpaceTop = 0
> extraSpaceBottom = 0
> extraSpaceBetweenLines = 0
> menuChannel = a ValueHolder on: a Menu
> performer = a Workbook
> menuButtons = an OrderedCollection[5]
> nextMenuButton = nil
> Arguments:
> each = a MacOSXMenuBarButtonView
> Temporaries:
> .aKeypressEvent = a PrefocusKeypressEvent
> Context PC = 10
>
> ----------------------------------------------------------------------
> OrderedCollection>>do:
> Receiver:
> an OrderedCollection
> Instance Variables:
> firstIndex = 1
> lastIndex = 5
> Arguments:
> aBlock = BlockClosure [] in MenuBar>>prefocusKeypressEvent:
> Temporaries:
> index = 3
> Context PC = 17
>
> ----------------------------------------------------------------------
> MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
> Receiver:
> a MacOSXMenuBar
> Instance Variables:
> container = a MenuBarWrapper on: a MacOSXMenuBar
> eventHandlers = nil
> properties = nil
> components = an OrderedCollection[5]
> preferredBounds = 0 @ 0 corner: 233 @ 22
> leftSpace = 0
> spaceBetweenItems = 0
> extraSpaceTop = 0
> extraSpaceBottom = 0
> extraSpaceBetweenLines = 0
> menuChannel = a ValueHolder on: a Menu
> performer = a Workbook
> menuButtons = an OrderedCollection[5]
> nextMenuButton = nil
> Arguments:
> aKeypressEvent = a PrefocusKeypressEvent
> Context PC = 44
>
> ----------------------------------------------------------------------
> PrefocusKeypressEvent>>dispatchTo:
> Receiver:
> a PrefocusKeypressEvent
> Instance Variables:
> time = nil
> initiator = an EventDispatcher
> window = a ScheduledWindow 32076224
> state = nil
> keyCharacter = $ "16r0004"
> metaState = 2
> alternativeKeyCharacter = nil
> wasHandled = nil
> Arguments:
> anObject = a MacOSXMenuBar
> Context PC = 4
>
> ----------------------------------------------------------------------
> KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
> Receiver:
> a KeyboardProcessor
> Instance Variables:
> keyboardHook = nil
> focusIsShifting = false
> acceptOnControlChange = false
> menuBar = a MacOSXMenuBar
> parentVisual = a ScheduledWindow 32076224
> focusedView = a TextEditorView
> Arguments:
> aKeyEvent = a KeyPressedEvent
> Temporaries:
> prefocus = a PrefocusKeypressEvent
> Context PC = 17
>
> ----------------------------------------------------------------------
> KeyboardProcessor>>processKeyboardEvent:
> Receiver:
> a KeyboardProcessor
> Instance Variables:
> keyboardHook = nil
> focusIsShifting = false
> acceptOnControlChange = false
> menuBar = a MacOSXMenuBar
> parentVisual = a ScheduledWindow 32076224
> focusedView = a TextEditorView
> Arguments:
> aKeyboardEvent = a KeyPressedEvent
> Context PC = 5
>
> ----------------------------------------------------------------------
> KeyboardProcessor>>processKeyboardEvent:for:
> Receiver:
> a KeyboardProcessor
> Instance Variables:
> keyboardHook = nil
> focusIsShifting = false
> acceptOnControlChange = false
> menuBar = a MacOSXMenuBar
> parentVisual = a ScheduledWindow 32076224
> focusedView = a TextEditorView
> Arguments:
> keyboardEvent = a KeyPressedEvent
> aController = an ApplicationStandardSystemController
> Temporaries:
> ev = a KeyPressedEvent
> Context PC = 26
>
> ----------------------------------------------------------------------
> EventDispatcher>>dispatchEvent:
> Receiver:
> an EventDispatcher
> Instance Variables:
> windowController = an ApplicationStandardSystemController
> currentMouseConsumer = nil
> grabbingMouse = false
> lastControlObject = nil
> trapList = nil
> state = nil
> repairDamageWhenDebugging = true
> flushQueueAfterError = true
> distributeEventsWhenDebugging = true
> dragDropInProgress = false
> dragDropTracker = nil
> dispatchUnknownEvents = false
> Arguments:
> event = a KeyPressedEvent
> Temporaries:
> objectWantingControl = nil
> targetKeyboardProcessor = a KeyboardProcessor
> Context PC = 99
>
> ----------------------------------------------------------------------
> KeyPressedEvent(Event)>>dispatch
> Receiver:
> a KeyPressedEvent
> Instance Variables:
> time = nil
> initiator = an EventDispatcher
> window = a ScheduledWindow 32076224
> state = nil
> keyCharacter = $ "16r0004"
> metaState = 2
> alternativeKeyCharacter = nil
> Context PC = 16
>
> ----------------------------------------------------------------------
> KeyPressedEvent(Event)>>dispatchForWindowManager:
> Receiver:
> a KeyPressedEvent
> Instance Variables:
> time = nil
> initiator = an EventDispatcher
> window = a ScheduledWindow 32076224
> state = nil
> keyCharacter = $ "16r0004"
> metaState = 2
> alternativeKeyCharacter = nil
> Arguments:
> aWinMgr = a WindowManager
> Context PC = 4
>
> ----------------------------------------------------------------------
> optimized [] in WindowManager>>safelyDispatchForWindowManager:
> Receiver:
> an UndefinedObject
> Temporaries:
> .event = a KeyPressedEvent
> .self = a WindowManager
> Context PC = 6
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
> outerContext = nil
> copiedValues = an Array[2]
> Arguments:
> anExceptionSelector = BadControllerError
> handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
> Context PC = 18
>
> ----------------------------------------------------------------------
> WindowManager>>safelyDispatchForWindowManager:
> Receiver:
> a WindowManager
> Instance Variables:
> windows = an OrderedCollection[3]
> activeController = nil
> interruptLock = false
> outstandingMetaOrDamage = false
> openInProgress = false
> eventQueue = an EventQueue
> baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
> dontFilterEvents = false
> Arguments:
> event = a KeyPressedEvent
> Context PC = 13
>
> ----------------------------------------------------------------------
> WindowManager>>processNextEvent
> Receiver:
> a WindowManager
> Instance Variables:
> windows = an OrderedCollection[3]
> activeController = nil
> interruptLock = false
> outstandingMetaOrDamage = false
> openInProgress = false
> eventQueue = an EventQueue
> baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
> dontFilterEvents = false
> Temporaries:
> event = a KeyPressedEvent
> Context PC = 9
>
> ----------------------------------------------------------------------
> optimized [] in [] in WindowManager>>newProcess
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a WindowManager
> Context PC = 13
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in [] in WindowManager>>newProcess
> outerContext = nil
> copiedValues = a WindowManager
> Arguments:
> anExceptionSelector = TerminateException
> handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in WindowManager>>newProcess
> Receiver:
> an UndefinedObject
> Temporaries:
> .self = a WindowManager
> Context PC = 15
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
> a BlockClosure
> Instance Variables:
> method = CompiledBlock [] in WindowManager>>newProcess
> outerContext = nil
> copiedValues = a WindowManager
> Arguments:
> anExceptionSelector = TerminateException
> handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in Process class>>forBlock:priority:
> Receiver:
> an UndefinedObject
> Temporaries:
> .aBlock = BlockClosure [] in WindowManager>>newProcess
> Context PC = 9
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Help sending binary data with HTTP put

Jerry Kott
In reply to this post by cdavidshaffer
David, you should use a String, not a ByteArray, for the readStream when setting the source. However, you'll get a 'HTTP/1.1 301 Redirect' response from the following snippet of code:

request := Net.HttpRequest put: 'http://yahoo.com'.
request 
body: (Net.SimpleBody new source: 'hi!' readStream);
contentLength: 3;
shouldChunk: false.
request execute

As Boris pointed out, there may be more you have to do than a simple PUT.

Jerry Kott
Smalltalk Development, Cincom Systems

On 11-12-2013, at 5:57 PM, David Shaffer wrote:

I'm getting a walkback:

"Actually putting to AWS/S3 via Cloudfork but this code snippet demonstrates problem"
request := Net.HttpRequest put: 'http://yahoo.com'.
request
body: (Net.SimpleBody new source: #[1 2 3] readStream);
contentLength: 3;
shouldChunk: false.
request execute

If I execute this request I get the walkback (in vw7.9) pasted below.  I'm sure that I'm missing something simple...just can't seem to find it in NetClientDevGuide.  Any pointers would be appreciated.

David

Unhandled exception: No character available for character value 1
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
ByteStreamEncoder>>write:on:
EncodedStream>>nextPut:
Net.SimpleBody>>byteValueAsStream
Net.SimpleBody>>writeOn:
Net.HttpWriteHandler>>startSimpleBody:
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Net.SimpleBody>>acceptVisit:with:
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
BlockClosure>>ensure:
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Net.HttpDispatcher>>acceptMessage:with:
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Net.HttpProtocolInterpreter>>executeWithConnection:
Net.HttpProtocolInterpreter>>executeRequest:
Net.HttpClient>>privateExecuteRequest
Net.HttpClient>>executeRequestDo:
Net.HttpClient>>executeAndGetResponse
Net.HttpClient>>executeRequest:
optimized [] in Net.HttpRequest>>execute
BlockClosure>>ensure:
Net.HttpRequest>>execute
UndefinedObject>>unboundMethod
UndefinedObject(Object)>>performMethod:arguments:
UndefinedObject(Object)>>performMethod:
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
optimized [] in TextEditorController>>evaluateSelection
BlockClosure>>ensure:
Cursor>>showWhile:
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
optimized [] in TextEditorController>>doIt
BlockClosure>>on:do:
HighlightingTextEditorController(TextEditorController)>>doIt
WorkspacePage>>doIt
Workbook(AbstractWorkspace)>>smalltalkDoIt
MenuBarButtonController>>dispatchMenuSymbol:
MenuBarButtonController>>dispatchMenuSelection:
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>ensure:
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
BlockClosure>>on:do:
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
OrderedCollection>>do:
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
PrefocusKeypressEvent>>dispatchTo:
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:for:
EventDispatcher>>dispatchEvent:
KeyPressedEvent(Event)>>dispatch
KeyPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
IllegalCharacterStreamErrorPolicy>>noEncodingFor:in:
Receiver:
an IllegalCharacterStreamErrorPolicy
Instance Variables:
streamEncoder = nil
Arguments:
aCharacter = 1
aStream = a ReadWriteStream
Context PC = 26

----------------------------------------------------------------------
ByteStreamEncoder(StreamEncoder)>>noEncodingFor:in:
Receiver:
a ByteStreamEncoder
Instance Variables:
encoder = a ByteCharacterEncoder
errorPolicy = an IllegalCharacterStreamErrorPolicy
skipRecord = a PositionRecord
Arguments:
aCharacter = 1
aStream = a ReadWriteStream
Context PC = 7

----------------------------------------------------------------------
ByteStreamEncoder>>write:on:
Receiver:
a ByteStreamEncoder
Instance Variables:
encoder = a ByteCharacterEncoder
errorPolicy = an IllegalCharacterStreamErrorPolicy
skipRecord = a PositionRecord
Arguments:
c = 1
aStream = a ReadWriteStream
Temporaries:
code = 65535
Context PC = 15

----------------------------------------------------------------------
EncodedStream>>nextPut:
Receiver:
an EncodedStream
Instance Variables:
binary = false
stream = a ReadWriteStream
encoder = a ByteStreamEncoder
policy = nil
lineEndConvention = 4
lineEndCharacter = nil
skipSize = a PositionRecord
Arguments:
anObject = 1
Context PC = 19

----------------------------------------------------------------------
Net.SimpleBody>>byteValueAsStream
Receiver:
a Net.SimpleBody
Instance Variables:
source = a ReadStream
parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



value = nil
byteSource = nil
Temporaries:
stream = an EncodedStream on a ReadWriteStream with a ByteStreamEncoder
encoding = 'us-ascii'
Context PC = 103

----------------------------------------------------------------------
Net.SimpleBody>>writeOn:
Receiver:
a Net.SimpleBody
Instance Variables:
source = a ReadStream
parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



value = nil
byteSource = nil
Arguments:
aStream = an ExternalReadAppendStream
Temporaries:
input = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpWriteHandler>>startSimpleBody:
Receiver:
a Net.HttpWriteHandler
Instance Variables:
dispatcher = a Net.HttpDispatcher
options = a Net.HttpWritingOptions
streams = an OrderedCollection[1]
fieldStream = a WriteStream
originalStream = an ExternalReadAppendStream
binaryMode = false
Arguments:
aSimpleBody = 

Context PC = 6

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Receiver:
an UndefinedObject
Temporaries:
.self = a Net.HttpDispatcher
.aSimpleBody = 

Context PC = 8

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in Net.MimeDispatcher>>acceptSimpleBody:with:
outerContext = nil
copiedValues = an Array[2]
Arguments:
aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptSimpleBody:with:
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptSimpleBody:with:
Receiver:
a Net.HttpDispatcher
Instance Variables:
handler = a Net.HttpWriteHandler
Arguments:
aSimpleBody = 

argument = nil
Context PC = 20

----------------------------------------------------------------------
Net.SimpleBody>>acceptVisit:with:
Receiver:
a Net.SimpleBody
Instance Variables:
source = a ReadStream
parent = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



value = nil
byteSource = nil
Arguments:
aVisitor = a Net.HttpDispatcher
argument = nil
Context PC = 5

----------------------------------------------------------------------
optimized [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
an UndefinedObject
Temporaries:
.aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



.self = a Net.HttpDispatcher
.argument = nil
Context PC = 8

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeOutputHandler)>>processMessageBody:do:
Receiver:
a Net.HttpWriteHandler
Instance Variables:
dispatcher = a Net.HttpDispatcher
options = a Net.HttpWritingOptions
streams = an OrderedCollection[1]
fieldStream = a WriteStream
originalStream = an ExternalReadAppendStream
binaryMode = false
Arguments:
aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



aBlock = BlockClosure [] in [] in Net.MimeDispatcher>>acceptMessage:with:
Context PC = 3

----------------------------------------------------------------------
optimized [] in Net.MimeDispatcher>>acceptMessage:with:
Receiver:
an UndefinedObject
Temporaries:
.aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



.self = a Net.HttpDispatcher
.argument = nil
Context PC = 32

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in Net.MimeDispatcher>>acceptMessage:with:
outerContext = nil
copiedValues = an Array[3]
Arguments:
aBlock = BlockClosure [] in Net.MimeDispatcher>>acceptMessage:with:
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpDispatcher(Net.MimeDispatcher)>>acceptMessage:with:
Receiver:
a Net.HttpDispatcher
Instance Variables:
handler = a Net.HttpWriteHandler
Arguments:
aMessage = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



argument = nil
Context PC = 26

----------------------------------------------------------------------
Net.HttpDispatcher>>acceptMessage:with:
Receiver:
a Net.HttpDispatcher
Instance Variables:
handler = a Net.HttpWriteHandler
Arguments:
aHttpEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



argument = nil
Context PC = 15

----------------------------------------------------------------------
Net.HttpRequest(Net.HttpEntity)>>acceptVisit:with:
Receiver:
a Net.HttpRequest
Instance Variables:
source = nil
parent = nil
value = 

header = Connection: Keep-Alive

Host: yahoo.com

headerCharset = nil
readingOptions = a Net.HttpReadingOptions
writingOptions = a Net.HttpWritingOptions
nextNamespaceId = nil
requestLine = PUT / HTTP/1.1
Arguments:
aVisitor = a Net.HttpDispatcher
argument = nil
Context PC = 5

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessageElement:on:
Receiver:
a Net.HttpWriteHandler
Instance Variables:
dispatcher = a Net.HttpDispatcher
options = a Net.HttpWritingOptions
streams = an OrderedCollection[1]
fieldStream = a WriteStream
originalStream = an ExternalReadAppendStream
binaryMode = false
Arguments:
aMessageElement = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



aStream = an ExternalReadAppendStream
Context PC = 11

----------------------------------------------------------------------
Net.HttpWriteHandler(Net.MimeWriteHandler)>>writeMessage:on:
Receiver:
a Net.HttpWriteHandler
Instance Variables:
dispatcher = a Net.HttpDispatcher
options = a Net.HttpWritingOptions
streams = an OrderedCollection[1]
fieldStream = a WriteStream
originalStream = an ExternalReadAppendStream
binaryMode = false
Arguments:
aMimeEntity = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



aStream = an ExternalReadAppendStream
Context PC = 6

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeWithConnection:
Receiver:
a Net.HttpProtocolInterpreter
Instance Variables:
connection = a Net.HttpConnection
authPolicy = a Net.AuthenticationPolicy
cookieAgent = a Net.CookieAgent
enableCookies = true
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



hostName = 'yahoo.com'
portNumber = 80
timeout = 20000
useProxy = false
proxyHost = nil
readingOptions = a Net.HttpReadingOptions
writingOptions = a Net.HttpWritingOptions
Arguments:
aConnectionStream = an ExternalReadAppendStream
Context PC = 18

----------------------------------------------------------------------
Net.HttpProtocolInterpreter>>executeRequest:
Receiver:
a Net.HttpProtocolInterpreter
Instance Variables:
connection = a Net.HttpConnection
authPolicy = a Net.AuthenticationPolicy
cookieAgent = a Net.CookieAgent
enableCookies = true
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



hostName = 'yahoo.com'
portNumber = 80
timeout = 20000
useProxy = false
proxyHost = nil
readingOptions = a Net.HttpReadingOptions
writingOptions = a Net.HttpWritingOptions
Arguments:
aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 18

----------------------------------------------------------------------
Net.HttpClient>>privateExecuteRequest
Receiver:
a Net.HttpClient
Instance Variables:
user = nil
hostName = nil
portNumber = nil
clientPI = a Net.HttpProtocolInterpreter
retries = nil
timeout = nil
delaySeconds = nil
state = nil
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



keepAlive = true
protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequestDo:
Receiver:
a Net.HttpClient
Instance Variables:
user = nil
hostName = nil
portNumber = nil
clientPI = a Net.HttpProtocolInterpreter
retries = nil
timeout = nil
delaySeconds = nil
state = nil
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



keepAlive = true
protocol = nil
Arguments:
aBlock = nil
Temporaries:
streamx = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpClient>>executeAndGetResponse
Receiver:
a Net.HttpClient
Instance Variables:
user = nil
hostName = nil
portNumber = nil
clientPI = a Net.HttpProtocolInterpreter
retries = nil
timeout = nil
delaySeconds = nil
state = nil
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



keepAlive = true
protocol = nil
Context PC = 11

----------------------------------------------------------------------
Net.HttpClient>>executeRequest:
Receiver:
a Net.HttpClient
Instance Variables:
user = nil
hostName = nil
portNumber = nil
clientPI = a Net.HttpProtocolInterpreter
retries = nil
timeout = nil
delaySeconds = nil
state = nil
request = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



keepAlive = true
protocol = nil
Arguments:
aRequest = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 7

----------------------------------------------------------------------
optimized [] in Net.HttpRequest>>execute
Receiver:
an UndefinedObject
Temporaries:
.client = aHttpClient on: yahoo.com:80
.self = PUT / HTTP/1.1
Host: yahoo.com
Connection: Keep-Alive



Context PC = 6

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in Net.HttpRequest>>execute
outerContext = nil
copiedValues = an Array[2]
Arguments:
aBlock = BlockClosure [] in Net.HttpRequest>>execute
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
Net.HttpRequest>>execute
Receiver:
a Net.HttpRequest
Instance Variables:
source = nil
parent = nil
value = 

header = Connection: Keep-Alive

Host: yahoo.com

headerCharset = nil
readingOptions = a Net.HttpReadingOptions
writingOptions = a Net.HttpWritingOptions
nextNamespaceId = nil
requestLine = PUT / HTTP/1.1
Temporaries:
client = aHttpClient on: yahoo.com:80
Context PC = 16

----------------------------------------------------------------------
UndefinedObject>>unboundMethod
Receiver:
an UndefinedObject
Context PC = 27

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:arguments:
Receiver:
an UndefinedObject
Arguments:
method = AnnotatedMethod UndefinedObject>>unboundMethod
args = an Array[0]
Context PC = 5

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:
Receiver:
an UndefinedObject
Arguments:
method = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 5

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateCompiled:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 1196
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
maxChars = nil
nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
currentUndo = a TextUndo #Typing [+] readStream[+]
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
Temporaries:
context = nil
Context PC = 13

----------------------------------------------------------------------
optimized [] in TextEditorController>>evaluateSelection
Receiver:
an UndefinedObject
Temporaries:
.self = a HighlightingTextEditorController
.code = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 7

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in TextEditorController>>evaluateSelection
outerContext = nil
copiedValues = an Array[2]
Arguments:
aBlock = BlockClosure [] in Cursor>>showWhile:
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
Cursor>>showWhile:
Receiver:
a Cursor
Instance Variables:
errorCode = nil
handle = a ByteArray[4]
image = Depth1Image(extent: 16 @ 16 depth: 1)
mask = Depth1Image(extent: 16 @ 16 depth: 1)
hotSpot = 1 @ 1
name = 'xeq'
Arguments:
aBlock = BlockClosure [] in TextEditorController>>evaluateSelection
Temporaries:
oldcursor = Cursor normal
Context PC = 23

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>evaluateSelection
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 1196
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
maxChars = nil
nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
currentUndo = a TextUndo #Typing [+] readStream[+]
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Temporaries:
code = AnnotatedMethod UndefinedObject>>unboundMethod
result = nil
Context PC = 14

----------------------------------------------------------------------
optimized [] in TextEditorController>>doIt
Receiver:
an UndefinedObject
Temporaries:
.self = a HighlightingTextEditorController
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in TextEditorController>>doIt
outerContext = nil
copiedValues = a HighlightingTextEditorController
Arguments:
anExceptionSelector = CompilationError
handlerBlock = BlockClosure [] in TextEditorController>>doIt
Context PC = 18

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>doIt
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 1196
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
maxChars = nil
nextUndoBlock = BlockClosure [] in TextEditorController>>appendToSelection:
currentUndo = a TextUndo #Typing [+] readStream[+]
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Context PC = 20

----------------------------------------------------------------------
WorkspacePage>>doIt
Receiver:
a WorkspacePage
Instance Variables:
dependents = a PluggableAdaptor
builder = an UIBuilder
uiSession = nil
eventHandlers = nil
workspace = a Workbook
label = 'AWS.ws'
verboseLabel = nil
filename = a PortableFilename('AWS.ws')
fileTimestamp = December 10, 2013 2:46:42 PM
textModel = a PluggableAdaptor
unacceptedText = nil
savedSelection = an Array[2]
savedFileTimestamp = December 10, 2013 2:46:42 PM
textModelOverride = nil
Context PC = 16

----------------------------------------------------------------------
Workbook(AbstractWorkspace)>>smalltalkDoIt
Receiver:
a Workbook
Instance Variables:
dependents = a ScheduledWindow 32076224
builder = an UIBuilder
uiSession = a ControlManager
eventHandlers = nil
locals = a WorkspaceVariablePool[7]
importAll = true
specificImports = an Array[3]
importSummaryHolder = a ValueHolder on: 'All'
pageExplanationHolder = a ValueHolder on: 'AWS.ws'
statusBarVisible = true
encodingChannel = a ValueHolder on: #Source
menuBarHolder = a ValueHolder on: a Menu
pageHolder = a SelectionInList
lastInstalledPage = a WorkspacePage
Context PC = 5

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSymbol:
Receiver:
a MenuBarButtonController
Instance Variables:
model = nil
view = a MacOSXMenuBarButtonView
Arguments:
menuSelection = #smalltalkDoIt
Context PC = 38

----------------------------------------------------------------------
MenuBarButtonController>>dispatchMenuSelection:
Receiver:
a MenuBarButtonController
Instance Variables:
model = nil
view = a MacOSXMenuBarButtonView
Arguments:
menuSelection = #smalltalkDoIt
Context PC = 17

----------------------------------------------------------------------
optimized [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
an UndefinedObject
Temporaries:
.self = a MacOSXMenuBarButtonView
.theValue = #smalltalkDoIt
Context PC = 12

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
outerContext = nil
copiedValues = an Array[2]
Arguments:
aBlock = BlockClosure [] in [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
an UndefinedObject
Temporaries:
.self = a MacOSXMenuBarButtonView
.theValue = #smalltalkDoIt
Context PC = 14

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
outerContext = nil
copiedValues = an Array[2]
Arguments:
anExceptionSelector = VetoAction
handlerBlock = BlockClosure [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor:
Context PC = 18

----------------------------------------------------------------------
MacOSXMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor:
Receiver:
a MacOSXMenuBarButtonView
Instance Variables:
container = a BoundedWrapper on: a MacOSXMenuBarButtonView
eventHandlers = nil
properties = nil
model = nil
controller = a MenuBarButtonController
state = a WidgetState
isInTransition = true
latestValue = nil
referenceValue = true
label = Label for 'Smalltalk'
textStyle = a VariableSizeTextAttributes
menuHolder = a Menu
menuBar = a MacOSXMenuBar
Arguments:
aKeyboardEvent = a PrefocusKeypressEvent
Temporaries:
theMenu = a Menu
matchingMenuItem = a MenuItem 'Do it'
theValue = #smalltalkDoIt
selector = nil
Context PC = 55

----------------------------------------------------------------------
[] in MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
a MacOSXMenuBar
Instance Variables:
container = a MenuBarWrapper on: a MacOSXMenuBar
eventHandlers = nil
properties = nil
components = an OrderedCollection[5]
preferredBounds = 0 @ 0 corner: 233 @ 22
leftSpace = 0
spaceBetweenItems = 0
extraSpaceTop = 0
extraSpaceBottom = 0
extraSpaceBetweenLines = 0
menuChannel = a ValueHolder on: a Menu
performer = a Workbook
menuButtons = an OrderedCollection[5]
nextMenuButton = nil
Arguments:
each = a MacOSXMenuBarButtonView
Temporaries:
.aKeypressEvent = a PrefocusKeypressEvent
Context PC = 10

----------------------------------------------------------------------
OrderedCollection>>do:
Receiver:
an OrderedCollection
Instance Variables:
firstIndex = 1
lastIndex = 5
Arguments:
aBlock = BlockClosure [] in MenuBar>>prefocusKeypressEvent:
Temporaries:
index = 3
Context PC = 17

----------------------------------------------------------------------
MacOSXMenuBar(MenuBar)>>prefocusKeypressEvent:
Receiver:
a MacOSXMenuBar
Instance Variables:
container = a MenuBarWrapper on: a MacOSXMenuBar
eventHandlers = nil
properties = nil
components = an OrderedCollection[5]
preferredBounds = 0 @ 0 corner: 233 @ 22
leftSpace = 0
spaceBetweenItems = 0
extraSpaceTop = 0
extraSpaceBottom = 0
extraSpaceBetweenLines = 0
menuChannel = a ValueHolder on: a Menu
performer = a Workbook
menuButtons = an OrderedCollection[5]
nextMenuButton = nil
Arguments:
aKeypressEvent = a PrefocusKeypressEvent
Context PC = 44

----------------------------------------------------------------------
PrefocusKeypressEvent>>dispatchTo:
Receiver:
a PrefocusKeypressEvent
Instance Variables:
time = nil
initiator = an EventDispatcher
window = a ScheduledWindow 32076224
state = nil
keyCharacter = $ "16r0004"
metaState = 2
alternativeKeyCharacter = nil
wasHandled = nil
Arguments:
anObject = a MacOSXMenuBar
Context PC = 4

----------------------------------------------------------------------
KeyboardProcessor>>broadcastPrefocusKeyboardEvent:
Receiver:
a KeyboardProcessor
Instance Variables:
keyboardHook = nil
focusIsShifting = false
acceptOnControlChange = false
menuBar = a MacOSXMenuBar
parentVisual = a ScheduledWindow 32076224
focusedView = a TextEditorView
Arguments:
aKeyEvent = a KeyPressedEvent
Temporaries:
prefocus = a PrefocusKeypressEvent
Context PC = 17

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:
Receiver:
a KeyboardProcessor
Instance Variables:
keyboardHook = nil
focusIsShifting = false
acceptOnControlChange = false
menuBar = a MacOSXMenuBar
parentVisual = a ScheduledWindow 32076224
focusedView = a TextEditorView
Arguments:
aKeyboardEvent = a KeyPressedEvent
Context PC = 5

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:for:
Receiver:
a KeyboardProcessor
Instance Variables:
keyboardHook = nil
focusIsShifting = false
acceptOnControlChange = false
menuBar = a MacOSXMenuBar
parentVisual = a ScheduledWindow 32076224
focusedView = a TextEditorView
Arguments:
keyboardEvent = a KeyPressedEvent
aController = an ApplicationStandardSystemController
Temporaries:
ev = a KeyPressedEvent
Context PC = 26

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
an EventDispatcher
Instance Variables:
windowController = an ApplicationStandardSystemController
currentMouseConsumer = nil
grabbingMouse = false
lastControlObject = nil
trapList = nil
state = nil
repairDamageWhenDebugging = true
flushQueueAfterError = true
distributeEventsWhenDebugging = true
dragDropInProgress = false
dragDropTracker = nil
dispatchUnknownEvents = false
Arguments:
event = a KeyPressedEvent
Temporaries:
objectWantingControl = nil
targetKeyboardProcessor = a KeyboardProcessor
Context PC = 99

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatch
Receiver:
a KeyPressedEvent
Instance Variables:
time = nil
initiator = an EventDispatcher
window = a ScheduledWindow 32076224
state = nil
keyCharacter = $ "16r0004"
metaState = 2
alternativeKeyCharacter = nil
Context PC = 16

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
a KeyPressedEvent
Instance Variables:
time = nil
initiator = an EventDispatcher
window = a ScheduledWindow 32076224
state = nil
keyCharacter = $ "16r0004"
metaState = 2
alternativeKeyCharacter = nil
Arguments:
aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
an UndefinedObject
Temporaries:
.event = a KeyPressedEvent
.self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
outerContext = nil
copiedValues = an Array[2]
Arguments:
anExceptionSelector = BadControllerError
handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[3]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
dontFilterEvents = false
Arguments:
event = a KeyPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[3]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
dontFilterEvents = false
Temporaries:
event = a KeyPressedEvent
Context PC = 9

----------------------------------------------------------------------
optimized [] in [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.self = a WindowManager
Context PC = 13

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
Context PC = 18

----------------------------------------------------------------------
optimized [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.self = a WindowManager
Context PC = 15

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18

----------------------------------------------------------------------
optimized [] in Process class>>forBlock:priority:
Receiver:
an UndefinedObject
Temporaries:
.aBlock = BlockClosure [] in WindowManager>>newProcess
Context PC = 9


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Help sending binary data with HTTP put

cdavidshaffer
In reply to this post by Boris Popov, DeepCove Labs (SNN)

On Dec 11, 2013, at 9:06 PM, Boris Slobodin, DeepCove Labs wrote:

> David,
>
> This is a snippet from our S3 uploader, hope it helps,
>
> (HttpRequest put: url)
> contentLength: bytes size;
> contentMD5: md5 asBase64String;
> contentType: 'binary/octet-stream';
> contentTransferEncoding: 'base64';
> byteSource: bytes readStream;
> doNotChunk;
> awsSign: key secret: secret;
> yourself.
>


Thanks folks!  I essentially followed Boris' suggestion of using the combination contentType:/contentTransferEncoding:/byteSource:.  I have patched Cloudfork and published to the open repository...in case anyone here uses CF.

David


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Help sending binary data with HTTP put

Holger Kleinsorgen
In reply to this post by cdavidshaffer
cdavidshaffer wrote
I'm getting a walkback:

"Actually putting to AWS/S3 via Cloudfork but this code snippet demonstrates problem"
request := Net.HttpRequest put: 'http://yahoo.com'.
request
        body: (Net.SimpleBody new source: #[1 2 3] readStream);
        contentLength: 3;
        shouldChunk: false.
request execute

If I execute this request I get the walkback (in vw7.9) pasted below.  I'm sure that I'm missing something simple...just can't seem to find it in NetClientDevGuide.  Any pointers would be appreciated.
| request |
request := Net.HttpRequest put: 'http://yahoo.com'.
request
        contents: #[1 2 3] readStream;
        " contentType: .... "
        contentLength: 3;
        shouldChunk: false.

use #contentType: to set a more specific content type than the default type "application/octet-stream"