EldoS | Feel safer!

Software components for data protection, secure storage and transfer

secureblackbox sample HTTPBlackbox

Posted: 09/13/2012 08:43:09
by Konstantin Komkov (Basic support level)
Joined: 09/06/2012
Posts: 2

Good day
I am stat with samples.
and have a problem with sample HTTPBlackbox httpsServer

it has correct respond only to "Get" request
  Private Sub ProcessRequest()
        Dim FS As FileStream = Nothing

        If m_currentRequest.Method = TSBHTTPMethod.hmGet Then
                FS = New FileStream(m_basePath + m_currentRequest.URL, FileMode.Open, FileAccess.Read)
                m_currentResponse.ContentLength = FS.Length
                m_currentResponse.StatusCode = 200
            Catch ex As Exception
                m_currentResponse.StatusCode = 404
            End Try

            m_currentResponse.StatusCode = 400
        End If

on "Post" server must save received file. (but samples has not this part)

ElseIf m_currentRequest.Method = TSBHTTPMethod.hmPost Then

How can i get file info from "post" request ? (all fields describen on post)
Post(URL As String, Fields As SBStringList.TElStringList, FileField As String, FileName As String, FileStream As System.IO.Stream, ContentType As String, CloseStream As Boolean) As Integer

Can i get it from m_currentResponse ?

I know that question is easy enough, but i have not found answers in samples ,doc or forum

Posted: 09/13/2012 11:30:49
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

on "Post" server must save received file.

In general a server can process POST request differently - not just save received file. This part was not implemented in the sample to simplify it.

I know that question is easy enough, but i have not found answers in samples ,doc or forum

Its not very easy. We'll enhance our sample to demonstrate this and write you back as soon as it will be ready.
Posted: 09/14/2012 01:51:49
by Vsevolod Ievgiienko (Team)

I've just sent you the enhanced sample via Helpdesk. This sample will be also available in the next SBB build.
Posted: 07/14/2015 10:02:36
by Raffaele Picone (Standard support level)
Joined: 07/14/2015
Posts: 2

I have the same problem. I don't understand how the Post Method can be handled at HTTP server side.
Can also send me a complete example ?
Posted: 07/14/2015 10:09:20
by Eugene Mayevski (Team)

HTTPPost sample includes a server-side PHP script which handles the data that the sample passes. So this is the complete sample.

In general, with POST method you start with the server - you implement some way to handle the files, and then on the client you prepare the transfer in format which is handled by the server.

If you tell me, what technology you use on the server, I might be able to give you a more detailed answer.

Sincerely yours
Eugene Mayevski



Topic viewed 1971 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!