Git Product home page Git Product logo

go-service-cos's People

Contributors

abyss-w avatar beyondrobot avatar burntcarrot avatar dependabot[bot] avatar jinnyyi avatar prnyself avatar xuanwo avatar xxchan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

abyss-w

go-service-cos's Issues

Service tracking issue for GSP-86: Add CreateLink Operation

This is the service tracking issue that generated by go-community, please close with comments if not applicable to this project.

Steps

If this service has native support for Link or Symlink:

  • Implement CreateLink API
  • Add support for List/Stat
  • Setup linker tests

If this service doesn't have native support for Link or Symlink, it's optinal to implement the virtual_link features:

  • Start a RFC to describe the way to implement the virtual_link feature (take this issue as the tracking issue)
  • Implement the RFC
  • Setup linker tests

Integration test fails when read with `Range: bytes=-xxx`

Expected Behavior

According to COS API doc, when GetObject with Range header:

例如 bytes=0-9,表示下载对象的开头10个字节的数据;bytes=5-9,表示下载对象的第6到第10个字节。此时返回 HTTP 状态码206(Partial Content)及 Content-Range 响应头部。

And also, FormatRangeOptions() was provided to format Range value in cos-go-sdk:

func FormatRangeOptions(opt *RangeOptions) string {
	if opt == nil {
		return ""
	}
	if opt.HasStart && opt.HasEnd {
		return fmt.Sprintf("bytes=%v-%v", opt.Start, opt.End)
	}
	if opt.HasStart {
		return fmt.Sprintf("bytes=%v-", opt.Start)
	}
	if opt.HasEnd {
		return fmt.Sprintf("bytes=-%v", opt.End)
	}
	return ""
}

Based on the above, we envision that when Range: bytes=-9 we should be able to download data from 0 to 9([0-9]).

Current Behavior

  • When setting RangeOptions.End as follows, we will get the read size check error.
    rangeOptions := &cos.RangeOptions{}
    if opt.HasSize {
      	rangeOptions.HasEnd = true
      	rangeOptions.End = rangeOptions.Start + opt.Size - 1
    }
    
  • When setting RangeOptions.End as follows, we will get the read content check error.
    rangeOptions := &cos.RangeOptions{}
    if opt.HasSize {
      	rangeOptions.HasEnd = true
      	rangeOptions.End = opt.Size
    }
    

Steps to Reproduce

Run integration test after modifying the code as above.

Enviroment

github.com/tencentyun/cos-go-sdk-v5 v0.7.31

Multiparter test failed

For CompleteMultipartUpload in cos:

  • If the numbers of the uploaded parts are not continuous, 400 InvalidPart will be returned when this API is called.
  • If the part information entries in the request body are not sorted by number in ascending order, 400 InvalidPartOrder will be returned when this API is called.

Random part number in CompletePart test case leads to the failure of multiparter integration test.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.