FAQ
(I believe my internet flaked out submitting this, if I double posted I
apologize.)

I've dug through the source code of go.net/websocket and I see no way to
specify an limit to an websocket.Message.Receive call, in my own tests I've
found that this code tries to receive an message no matter how large it may
be, in my tests I was only able to try messages of about 50MB, I would
imagine though that there is no hard limit set anywhere, this means any
websocket server could be attacked and taken down by only one single client
sending large amounts of fake data... at least this is what I think, I
would love to be proven wrong about this.

I would like to be able to specify an Message size limit (frame size limit?
I am unsure what the proper term would be), that way single websocket
connection could send an massive message, thus using up all my memory and
crashing the server program.

I've googled around an bit, and found this link regarding maximum header
sizes?<https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/2Tge6U8-QYI> In
it he says that he was testing close to the same thing as me -- though it
seems the original topic was never discussed in depth.

I've also checked the issue tracker and found nothing related to this..


Is it possible to do this? Is it considered an bug?

Thank you,
Stephen

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jeff Mitchell at Mar 18, 2013 at 1:34 pm

    Stephen Gutekanst wrote:
    (I believe my internet flaked out submitting this, if I double posted
    I apologize.)

    I've dug through the source code of go.net/websocket and I see no way
    to specify an limit to an websocket.Message.Receive call, in my own
    tests I've found that this code tries to receive an message no matter
    how large it may be, in my tests I was only able to try messages of
    about 50MB, I would imagine though that there is no hard limit set
    anywhere, this means any websocket server could be attacked and taken
    down by only one single client sending large amounts of fake data...
    at least this is what I think, I would love to be proven wrong about this.

    I would like to be able to specify an Message size limit (frame size
    limit? I am unsure what the proper term would be), that way single
    websocket connection could send an massive message, thus using up all
    my memory and crashing the server program.
    Garyburd's go-websocket library (https://github.com/garyburd/go-websocket) is both up-to-date w.r.t. RFC support and also allows you to set a maximum read size.

    --Jeff

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Stephen Gutekanst at Mar 19, 2013 at 5:36 pm
    Jeff,

    Thank you, I'll take an look at his library.

    In the mean time I've filled an issue report for this:

    https://code.google.com/p/go/issues/detail?id=5082

    - Stephen
    On Monday, March 18, 2013 6:34:31 AM UTC-7, Jeff Mitchell wrote:

    Stephen Gutekanst wrote:
    (I believe my internet flaked out submitting this, if I double posted
    I apologize.)

    I've dug through the source code of go.net/websocket and I see no way
    to specify an limit to an websocket.Message.Receive call, in my own
    tests I've found that this code tries to receive an message no matter
    how large it may be, in my tests I was only able to try messages of
    about 50MB, I would imagine though that there is no hard limit set
    anywhere, this means any websocket server could be attacked and taken
    down by only one single client sending large amounts of fake data...
    at least this is what I think, I would love to be proven wrong about this.
    I would like to be able to specify an Message size limit (frame size
    limit? I am unsure what the proper term would be), that way single
    websocket connection could send an massive message, thus using up all
    my memory and crashing the server program.
    Garyburd's go-websocket library (https://github.com/garyburd/go-websocket)
    is both up-to-date w.r.t. RFC support and also allows you to set a maximum
    read size.

    --Jeff
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 17, '13 at 4:07a
activeMar 19, '13 at 5:36p
posts3
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase